diff options
author | jkar8572 <jkar8572> | 2009-12-21 18:16:54 +0000 |
---|---|---|
committer | jkar8572 <jkar8572> | 2009-12-21 18:16:54 +0000 |
commit | 3786e49ea95fd4091d2a96b2db6104b225e44f2f (patch) | |
tree | 54b55568d2e9503bdbaa7f637c4524c9f7562441 /quotasys.c | |
parent | aee64e6dcd0366cd826587361b0becdf90a33608 (diff) |
Fixed error reporting when rpc format specified on command line (Jan Kara)
Added missing files.
Diffstat (limited to 'quotasys.c')
-rw-r--r-- | quotasys.c | 25 |
1 files changed, 20 insertions, 5 deletions
@@ -629,7 +629,11 @@ struct quota_handle **create_handle_list(int count, char **mntpoints, int type, if (init_mounts_scan(count, mntpoints, mntflags) < 0) die(2, _("Cannot initialize mountpoint scan.\n")); while ((mnt = get_next_mount())) { - if (!nfs_fstype(mnt->mnt_type)) { /* No NFS? */ +#ifndef RPC + if (nfs_fstype(mnt->mnt_type)) + continue; +#endif + if (fmt == -1 || count) { add_entry: if (gotmnt+1 >= hlist_allocated) { hlist_allocated += START_MNT_POINTS; @@ -639,10 +643,21 @@ add_entry: continue; gotmnt++; } - else if (fmt == -1 || fmt == QF_RPC) { /* Use NFS? */ -#ifdef RPC - goto add_entry; -#endif + else { + switch (fmt) { + case QF_RPC: + if (nfs_fstype(mnt->mnt_type)) + goto add_entry; + break; + case QF_XFS: + if (!strcmp(mnt->mnt_type, MNTTYPE_XFS)) + goto add_entry; + break; + default: + if (strcmp(mnt->mnt_type, MNTTYPE_XFS) && !nfs_fstype(mnt->mnt_type)) + goto add_entry; + break; + } } } end_mounts_scan(); |