From 0b34692854b79ea5438676e3d70cfe1de07b454c Mon Sep 17 00:00:00 2001 From: Jan Kara Date: Tue, 14 Sep 2010 20:44:38 +0200 Subject: 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 --- quotaio.c | 3 +++ 1 file changed, 3 insertions(+) (limited to 'quotaio.c') diff --git a/quotaio.c b/quotaio.c index ee8c48a..dbd7cc8 100644 --- a/quotaio.c +++ b/quotaio.c @@ -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; -- cgit v1.2.3