Merge commit 'refs/top-bases/linux-arc' into linux-arc

This commit is contained in:
Brian Behlendorf 2008-12-16 13:30:22 -08:00
commit 559a3f6626
1 changed files with 5 additions and 6 deletions

View File

@ -534,13 +534,12 @@ zfs_close(zfs_handle_t *zhp)
int int
zfs_spa_version(zfs_handle_t *zhp, int *version) zfs_spa_version(zfs_handle_t *zhp, int *version)
{ {
zpool_handle_t *zpool_handle = zhp->zpool_hdl; zpool_handle_t *handle = zhp->zpool_hdl;
if (zpool_handle == NULL) if (handle == NULL)
return (-1); return (-1);
*version = zpool_get_prop_int(zpool_handle, *version = zpool_get_prop_int(handle, ZPOOL_PROP_VERSION, NULL);
ZPOOL_PROP_VERSION, NULL);
return (0); return (0);
} }
@ -2328,11 +2327,11 @@ zfs_prop_get(zfs_handle_t *zhp, zfs_prop_t prop, char *propbuf, size_t proplen,
*/ */
{ {
val = getprop_uint64(zhp, prop, &source); val = getprop_uint64(zhp, prop, &source);
time_t time = (time_t)val; time_t local_time = (time_t)val;
struct tm t; struct tm t;
if (literal || if (literal ||
localtime_r(&time, &t) == NULL || localtime_r(&local_time, &t) == NULL ||
strftime(propbuf, proplen, "%a %b %e %k:%M %Y", strftime(propbuf, proplen, "%a %b %e %k:%M %Y",
&t) == 0) &t) == 0)
(void) snprintf(propbuf, proplen, "%llu", (u_longlong_t) val); (void) snprintf(propbuf, proplen, "%llu", (u_longlong_t) val);