diff options
author | Jan Kara <jack@suse.cz> | 2010-09-14 20:44:38 +0200 |
---|---|---|
committer | Jan Kara <jack@suse.cz> | 2010-09-14 20:47:01 +0200 |
commit | 0b34692854b79ea5438676e3d70cfe1de07b454c (patch) | |
tree | d7b5ddf573ff6a849ebddcee33ebe573454028d4 /quotaio.c | |
parent | 98605d6851ceb5ae1e5d720500983fc443b8af05 (diff) |
quota: Allow printing of mountpoint
Add options for quota(1) to print mount point as a part of a filesystem
identification and also do not print device a s part of a filesystem
identification.
Signed-off-by: Jan Kara <jack@suse.cz>
Diffstat (limited to 'quotaio.c')
-rw-r--r-- | quotaio.c | 3 |
1 files changed, 3 insertions, 0 deletions
@@ -59,6 +59,7 @@ struct quota_handle *init_io(struct mntent *mnt, int type, int fmt, int flags) sstrncpy(h->qh_quotadev, mnt_fsname, sizeof(h->qh_quotadev)); free((char *)mnt_fsname); sstrncpy(h->qh_fstype, mnt->mnt_type, MAX_FSTYPE_LEN); + sstrncpy(h->qh_dir, mnt->mnt_dir, PATH_MAX); if (nfs_fstype(mnt->mnt_type)) { /* NFS filesystem? */ if (fmt != -1 && fmt != QF_RPC) { /* User wanted some other format? */ errstr(_("Only RPC quota format is allowed on NFS filesystem.\n")); @@ -232,6 +233,8 @@ struct quota_handle *new_io(struct mntent *mnt, int type, int fmt) h->qh_fd = fd; h->qh_io_flags = 0; sstrncpy(h->qh_quotadev, mnt_fsname, sizeof(h->qh_quotadev)); + sstrncpy(h->qh_fstype, mnt->mnt_type, MAX_FSTYPE_LEN); + sstrncpy(h->qh_dir, mnt->mnt_dir, PATH_MAX); free((char *)mnt_fsname); h->qh_type = type; h->qh_fmt = fmt; |