Page MenuHomeFreeBSD

D11100.id.diff
No OneTemporary

D11100.id.diff

Index: cddl/contrib/opensolaris/cmd/zfs/zfs_main.c
===================================================================
--- cddl/contrib/opensolaris/cmd/zfs/zfs_main.c
+++ cddl/contrib/opensolaris/cmd/zfs/zfs_main.c
@@ -1329,7 +1329,7 @@
char buf[16];
zfs_nicenum(cb.cb_snapused, buf, sizeof (buf));
if (cb.cb_parsable) {
- (void) printf("reclaim\t%llu\n",
+ (void) printf("reclaim\t%"PRId64"\n",
cb.cb_snapused);
} else if (cb.cb_dryrun) {
(void) printf(gettext("would reclaim %s\n"),
@@ -2072,7 +2072,7 @@
if (version < cb->cb_version) {
char verstr[16];
(void) snprintf(verstr, sizeof (verstr),
- "%llu", cb->cb_version);
+ "%"PRIu64, cb->cb_version);
if (cb->cb_lastfs[0] && !same_pool(zhp, cb->cb_lastfs)) {
/*
* If they did "zfs upgrade -a", then we could
@@ -2180,10 +2180,10 @@
cb.cb_version = ZPL_VERSION;
ret = zfs_for_each(argc, argv, flags, ZFS_TYPE_FILESYSTEM,
NULL, NULL, 0, upgrade_set_callback, &cb);
- (void) printf(gettext("%llu filesystems upgraded\n"),
+ (void) printf(gettext("%"PRIu64" filesystems upgraded\n"),
cb.cb_numupgraded);
if (cb.cb_numsamegraded) {
- (void) printf(gettext("%llu filesystems already at "
+ (void) printf(gettext("%"PRIu64" filesystems already at "
"this version\n"),
cb.cb_numsamegraded);
}
@@ -2548,7 +2548,7 @@
if (cb->cb_nicenum)
zfs_nicenum(space, sizebuf, sizeof (sizebuf));
else
- (void) snprintf(sizebuf, sizeof (sizebuf), "%llu", space);
+ (void) snprintf(sizebuf, sizeof (sizebuf), "%"PRIu64, space);
sizelen = strlen(sizebuf);
if (prop == ZFS_PROP_USERUSED || prop == ZFS_PROP_GROUPUSED) {
propname = "used";
@@ -2619,7 +2619,7 @@
break;
case USFIELD_NAME:
if (type == DATA_TYPE_UINT64) {
- (void) sprintf(valstr, "%llu", val64);
+ (void) sprintf(valstr, "%"PRIu64, val64);
strval = valstr;
}
break;
@@ -2627,7 +2627,7 @@
case USFIELD_QUOTA:
if (type == DATA_TYPE_UINT64) {
if (parsable) {
- (void) sprintf(valstr, "%llu", val64);
+ (void) sprintf(valstr, "%"PRIu64, val64);
} else {
zfs_nicenum(val64, valstr,
sizeof (valstr));
@@ -2650,9 +2650,9 @@
if (scripted)
(void) printf("%s", strval);
else if (field == USFIELD_TYPE || field == USFIELD_NAME)
- (void) printf("%-*s", width[field], strval);
+ (void) printf("%-*s", (int)width[field], strval);
else
- (void) printf("%*s", width[field], strval);
+ (void) printf("%*s", (int)width[field], strval);
first = B_FALSE;
cfield++;
@@ -2677,10 +2677,10 @@
col = gettext(us_field_hdr[field]);
if (field == USFIELD_TYPE || field == USFIELD_NAME) {
(void) printf(first ? "%-*s" : " %-*s",
- width[field], col);
+ (int)width[field], col);
} else {
(void) printf(first ? "%*s" : " %*s",
- width[field], col);
+ (int)width[field], col);
}
first = B_FALSE;
cfield++;
@@ -2974,9 +2974,9 @@
if (pl->pl_next == NULL && !right_justify)
(void) printf("%s", header);
else if (right_justify)
- (void) printf("%*s", pl->pl_width, header);
+ (void) printf("%*s", (int)pl->pl_width, header);
else
- (void) printf("%-*s", pl->pl_width, header);
+ (void) printf("%-*s", (int)pl->pl_width, header);
}
(void) printf("\n");
@@ -3052,9 +3052,9 @@
if (cb->cb_scripted || (pl->pl_next == NULL && !right_justify))
(void) printf("%s", propstr);
else if (right_justify)
- (void) printf("%*s", pl->pl_width, propstr);
+ (void) printf("%*s", (int)pl->pl_width, propstr);
else
- (void) printf("%-*s", pl->pl_width, propstr);
+ (void) printf("%-*s", (int)pl->pl_width, propstr);
}
(void) printf("\n");
@@ -3616,7 +3616,7 @@
if (ds_start > 0) {
/* out-of-order prop=val argument */
(void) fprintf(stderr, gettext("invalid "
- "argument order\n"), i);
+ "argument order\n"));
usage(B_FALSE);
}
} else if (ds_start < 0) {
@@ -5203,7 +5203,7 @@
deleg_perm_node_t *deleg_node;
if (prev_weight != weight) {
- (void) printf(*title_ptr++);
+ (void) printf("%s", *title_ptr++);
prev_weight = weight;
}
@@ -5258,7 +5258,7 @@
const char *who = NULL;
if (prt_title) {
prt_title = B_FALSE;
- (void) printf(title);
+ (void) printf("%s", title);
}
switch (who_type) {
@@ -5319,7 +5319,7 @@
(void) snprintf(buf, sizeof (buf),
gettext("---- Permissions on %s "),
node->fspn_fsperm.fsp_name);
- (void) printf(dsname);
+ (void) printf("%s", dsname);
left = 70 - strlen(buf);
while (left-- > 0)
(void) printf("-");
@@ -5598,7 +5598,7 @@
for (i = 0; i < 3; i++) {
col = gettext(hdr_cols[i]);
if (i < 2)
- (void) printf("%-*s ", i ? tagwidth : nwidth,
+ (void) printf("%-*s ", i ? (int)tagwidth : (int)nwidth,
col);
else
(void) printf("%s\n", col);
@@ -5621,7 +5621,7 @@
(void) nvpair_value_uint64(nvp2, &val);
if (literal)
- snprintf(tsbuf, DATETIME_BUF_LEN, "%llu", val);
+ snprintf(tsbuf, DATETIME_BUF_LEN, "%"PRIu64, val);
else {
time = (time_t)val;
(void) localtime_r(&time, &t);
@@ -5629,8 +5629,7 @@
gettext(STRFTIME_FMT_STR), &t);
}
- (void) printf("%-*s%*c%-*s%*c%s\n", nwidth, zname,
- sepnum, sep, tagwidth, tagname, sepnum, sep, tsbuf);
+ (void) printf("%-*s%*c%-*s%*c%s\n", (int)nwidth, zname, (int)sepnum, (int)sep, (int)tagwidth, tagname, (int)sepnum, (int)sep, tsbuf);
}
}
}
@@ -6099,7 +6098,7 @@
/* original length plus new string to append plus 1 for the comma */
if (len + 1 + strlen(newopts) >= MNT_LINE_MAX) {
(void) fprintf(stderr, gettext("the opts argument for "
- "'%c' option is too long (more than %d chars)\n"),
+ "'%s' option is too long (more than %d chars)\n"),
"-o", MNT_LINE_MAX);
usage(B_FALSE);
}

File Metadata

Mime Type
text/plain
Expires
Wed, Mar 12, 10:18 AM (6 h, 56 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
17110796
Default Alt Text
D11100.id.diff (5 KB)

Event Timeline