Branch: Tag:

2014-12-04

2014-12-04 19:25:24 by Per Hedbor <ph@opera.com>

Removed dead code and fixed warnings.

771:    push_int(0);    }else{    int num_fields = 0; -  char *fsname = NULL; +    #ifdef HAVE_STATVFS   #if 0    push_text("id"); push_int(st.f_fsid);
786: Inside #if defined(HAVE_STATVFS)
   push_text("favail"); push_int(st.f_favail);    num_fields += 7;   #ifdef HAVE_STATVFS_F_FSTR -  push_text("fsname"); push_text(fsname = st.f_fstr); +  push_text("fsname"); push_text(st.f_fstr);    num_fields++;   #endif /* HAVE_STATVFS_F_FSTR */   #ifdef HAVE_STATVFS_F_BASETYPE
828: Inside #if defined(HAVE_USTAT)
  #ifdef HAVE_USTAT    push_text("bfree"); push_int(st.f_tfree);    push_text("ffree"); push_int(st.f_tinode); -  push_text("fsname"); push_text(fsname = st.f_fname); +  push_text("fsname"); push_text(st.f_fname);    num_fields += 3;   #else    /* Should not be reached */
836:   #endif /* HAVE_USTAT */   #endif /* HAVE_STATFS */   #endif /* HAVE_STATVFS */ - #if 0 - #if defined(HAVE_LIBZFS_INIT) && defined(HAVE_ZFS_PATH_TO_ZHANDLE) -  /* zfs_path_to_zhandle() has an unfortunate tendency to output stuff -  * to stderr when it fails... -  */ -  if (fsname && !strcmp(fsname, "zfs")) { -  zfs_handle_t *zfs_handle; -  if ((str->len == 1) && (str->str[0] == '.')) { -  /* Workaround for bug in zfs_path_to_zhandle(). */ -  zfs_handle = zfs_path_to_zhandle(libzfs_handle, "./", -  ZFS_TYPE_FILESYSTEM); -  } else { -  zfs_handle = zfs_path_to_zhandle(libzfs_handle, str->str, -  ZFS_TYPE_FILESYSTEM); -  } -  if (zfs_handle) { - #ifndef HAVE_ZFS_PROP_UTF8ONLY -  /* NOTE: ZFS_PROP_UTF8ONLY is not present in Solaris 10 127112-05. -  * Attempt to be forward compatible. -  */ - #define ZFS_PROP_UTF8ONLY (ZFS_PROP_XATTR + 4) - #endif /* !HAVE_ZFS_PROP_UTF8ONLY */ -  if (zfs_prop_get_int(zfs_handle, ZFS_PROP_UTF8ONLY)) { -  push_text("filename_encoding"); -  push_text("utf8"); -  num_fields++; -  } -  } -  } - #endif /* HAVE_LIBZFS_INIT && HAVE_ZFS_PATH_TO_ZHANDLE */ - #endif /* 0 */ -  +     f_aggregate_mapping(num_fields*2);    }   }