summaryrefslogtreecommitdiff
path: root/util/ifruset.c
diff options
context:
space:
mode:
Diffstat (limited to 'util/ifruset.c')
-rw-r--r--util/ifruset.c14
1 files changed, 10 insertions, 4 deletions
diff --git a/util/ifruset.c b/util/ifruset.c
index 0a9ac00..b2f8b66 100644
--- a/util/ifruset.c
+++ b/util/ifruset.c
@@ -105,8 +105,13 @@ extern void fmt_time(time_t etime, char *buf, int bufsz); /*see ievents.c*/
#define IPROD_FRUID 6
#define IPROD_OEM 7
+#ifdef METACOMMAND
+extern char * progver; /*from ipmiutil.c*/
+static char *progname = "ipmiutil fruset";
+#else
+static char * progver = "3.08";
static char *progname = "ifruset";
-static char *progver = "3.08";
+#endif
static char fdebug = 0;
static char fpicmg = 0;
static char fonlybase = 0;
@@ -240,7 +245,7 @@ int
load_fru(uchar sa, uchar frudev, uchar frutype)
{
int ret = 0;
- uchar indata[16];
+ uchar indata[FRUCHUNK_SZ];
uchar resp[18];
int sresp;
uchar cc;
@@ -250,6 +255,7 @@ load_fru(uchar sa, uchar frudev, uchar frutype)
int i;
int chunk;
+ memset(indata, 0, sizeof(indata));
indata[0] = frudev;
sresp = sizeof(resp);
if (fdebug) printf("load_fru: sa = %02x, frudev = %02x\n",sa,frudev);
@@ -918,7 +924,7 @@ write_fru_data(uchar id, ushort offset, uchar *data, int dlen, char fdebug)
int ret = -1;
int chunk;
ushort fruoff;
- uchar req[25];
+ uchar req[FRUCHUNK_SZ+9];
uchar resp[16];
int sresp;
uchar cc;
@@ -1215,7 +1221,7 @@ main(int argc, char **argv)
char *s1;
FILE *fp;
- printf("%s: version %s\n",progname,progver);
+ printf("%s version %s\n",progname,progver);
parse_lan_options('V',"4",0); /*request admin priv by default*/
while ( (c = getopt( argc, argv,"a:bcd:h:i:f:m:n:o:p:r:s:u:v:xyz:T:V:J:EYF:P:N:R:U:Z:?")) != EOF )
switch(c) {