diff options
author | jkar8572 <jkar8572> | 2005-11-21 22:30:23 +0000 |
---|---|---|
committer | jkar8572 <jkar8572> | 2005-11-21 22:30:23 +0000 |
commit | 6e8aa2396e0b2ef59f74cc97e109bbd14a395876 (patch) | |
tree | bf4ea3afdcb3d04c3d84486fc1a397306e4f0f4d | |
parent | d18a867ac9cdab3d3a6b176d242141be969351ec (diff) | |
download | linuxquota-6e8aa2396e0b2ef59f74cc97e109bbd14a395876.tar.gz |
Corrected some informal language in error messages (Jan Kara)
Quota(1) has now -f option to specify a list of filesystems (Jan Kara)
-rw-r--r-- | Changelog | 2 | ||||
-rw-r--r-- | convertquota.c | 22 | ||||
-rw-r--r-- | edquota.c | 14 | ||||
-rw-r--r-- | quota.c | 218 | ||||
-rw-r--r-- | quotacheck.c | 8 | ||||
-rw-r--r-- | quotacheck_v1.c | 6 | ||||
-rw-r--r-- | quotacheck_v2.c | 12 | ||||
-rw-r--r-- | quotaio.c | 6 | ||||
-rw-r--r-- | quotaio_v1.c | 4 | ||||
-rw-r--r-- | quotaio_v2.c | 12 | ||||
-rw-r--r-- | quotaon.c | 10 | ||||
-rw-r--r-- | quotaops.c | 20 | ||||
-rw-r--r-- | quotastats.c | 4 | ||||
-rw-r--r-- | quotasys.c | 48 | ||||
-rw-r--r-- | repquota.c | 2 | ||||
-rw-r--r-- | setquota.c | 2 | ||||
-rw-r--r-- | warnquota.c | 30 |
17 files changed, 214 insertions, 206 deletions
@@ -1,4 +1,6 @@ Changes in quota-tools from 3.13 to 3.14 +* quota(1) has -f option to specify filesystem list (Jan Kara) +* corrected some informal language in messages (Jan Kara) * we cannot even stat NFS mounts in local mode as server may be unreachable (Jan Kara) * fixed error messages in getprivs() (Jan Kara, Brian Morris) * made UID/GID prints unsigned (Matthew Kent) diff --git a/convertquota.c b/convertquota.c index cf7e3ea..9b29a95 100644 --- a/convertquota.c +++ b/convertquota.c @@ -118,7 +118,7 @@ static void read_blk(int fd, uint blk, dqbuf_t buf) lseek(fd, blk << V2_DQBLKSIZE_BITS, SEEK_SET); err = read(fd, buf, V2_DQBLKSIZE); if (err < 0) - die(2, _("Can't read block %u: %s\n"), blk, strerror(errno)); + die(2, _("Cannot read block %u: %s\n"), blk, strerror(errno)); else if (err != V2_DQBLKSIZE) memset(buf + err, 0, V2_DQBLKSIZE - err); } @@ -142,7 +142,7 @@ static void endian_report_block(int fd, uint blk, char *bitmap) endian_disk2memdqblk(&dquot.dq_dqb, ddata + i); dquot.dq_id = __be32_to_cpu(ddata[i].dqb_id); if (qn->qh_ops->commit_dquot(&dquot, COMMIT_ALL) < 0) - errstr(_("Can't commit dquot for id %u: %s\n"), + errstr(_("Cannot commit dquot for id %u: %s\n"), (uint)dquot.dq_id, strerror(errno)); } freedqbuf(buf); @@ -190,7 +190,7 @@ static int endian_check_header(int fd, int type) lseek(fd, 0, SEEK_SET); if (read(fd, &head, sizeof(head)) != sizeof(head)) { - errstr(_("Can't read header of old quotafile.\n")); + errstr(_("Cannot read header of old quotafile.\n")); return -1; } if (__be32_to_cpu(head.dqh_magic) != file_magics[type] || __be32_to_cpu(head.dqh_version) > known_versions[type]) { @@ -205,7 +205,7 @@ static int endian_load_info(int fd, int type) struct v2_disk_dqinfo dinfo; if (read(fd, &dinfo, sizeof(dinfo)) != sizeof(dinfo)) { - errstr(_("Can't read information about old quotafile.\n")); + errstr(_("Cannot read information about old quotafile.\n")); return -1; } qn->qh_info.u.v2_mdqi.dqi_flags = __be32_to_cpu(dinfo.dqi_flags); @@ -234,7 +234,7 @@ static int convert_dquot(struct dquot *dquot, char *name) newdquot.dq_dqb.dqb_btime = dquot->dq_dqb.dqb_btime; newdquot.dq_dqb.dqb_itime = dquot->dq_dqb.dqb_itime; if (qn->qh_ops->commit_dquot(&newdquot, COMMIT_ALL) < 0) { - errstr(_("Can't commit dquot for id %u: %s\n"), + errstr(_("Cannot commit dquot for id %u: %s\n"), (uint)dquot->dq_id, strerror(errno)); return -1; } @@ -247,13 +247,13 @@ static int rename_file(int type, struct mntent *mnt) int ret = 0; if (get_qf_name(mnt, type, (1 << QF_VFSV0), 0, &qfname) < 0) { - errstr(_("Can't get name of new quotafile.\n")); + errstr(_("Cannot get name of new quotafile.\n")); return -1; } strcpy(namebuf, qfname); sstrncat(namebuf, ".new", sizeof(namebuf)); if (rename(namebuf, qfname) < 0) { - errstr(_("Can't rename new quotafile %s to name %s: %s\n"), + errstr(_("Cannot rename new quotafile %s to name %s: %s\n"), namebuf, qfname, strerror(errno)); ret = -1; } @@ -267,12 +267,12 @@ static int convert_format(int type, struct mntent *mnt) int ret = 0; if (!(qo = init_io(mnt, type, QF_VFSOLD, IOI_OPENFILE))) { - errstr(_("Can't open old format file for %ss on %s\n"), + errstr(_("Cannot open old format file for %ss on %s\n"), type2name(type), mnt->mnt_dir); return -1; } if (!(qn = new_io(mnt, type, QF_VFSV0))) { - errstr(_("Can't create file for %ss for new format on %s: %s\n"), + errstr(_("Cannot create file for %ss for new format on %s: %s\n"), type2name(type), mnt->mnt_dir, strerror(errno)); end_io(qo); return -1; @@ -295,7 +295,7 @@ static int convert_endian(int type, struct mntent *mnt) if (get_qf_name(mnt, type, (1 << QF_VFSV0), NF_EXIST, &qfname) < 0) return -1; if ((ofd = open(qfname, O_RDONLY)) < 0) { - errstr(_("Can't open old quota file on %s: %s\n"), mnt->mnt_dir, strerror(errno)); + errstr(_("Cannot open old quota file on %s: %s\n"), mnt->mnt_dir, strerror(errno)); free(qfname); return -1; } @@ -305,7 +305,7 @@ static int convert_endian(int type, struct mntent *mnt) return -1; } if (!(qn = new_io(mnt, type, QF_VFSV0))) { - errstr(_("Can't create file for %ss for new format on %s: %s\n"), + errstr(_("Cannot create file for %ss for new format on %s: %s\n"), type2name(type), mnt->mnt_dir, strerror(errno)); close(ofd); return -1; @@ -34,7 +34,7 @@ #ident "$Copyright: (c) 1980, 1990 Regents of the University of California. $" #ident "$Copyright: All rights reserved. $" -#ident "$Id: edquota.c,v 1.17 2005/10/25 13:01:14 jkar8572 Exp $" +#ident "$Id: edquota.c,v 1.18 2005/11/21 22:30:23 jkar8572 Exp $" /* * Disk quota editor. @@ -201,7 +201,7 @@ int main(int argc, char **argv) ret = 0; if (tflag) { if (writetimes(handles, tmpfd) < 0) { - errstr(_("Can't write grace times to file.\n")); + errstr(_("Cannot write grace times to file.\n")); ret = -1; } if (editprivs(tmpfil) < 0) { @@ -218,7 +218,7 @@ int main(int argc, char **argv) id = name2id(*argv, quotatype, NULL); curprivs = getprivs(id, handles, 0); if (writeindividualtimes(curprivs, tmpfd, *argv, quotatype) < 0) { - errstr(_("Can't write individual grace times to file.\n")); + errstr(_("Cannot write individual grace times to file.\n")); ret = -1; continue; } @@ -228,7 +228,7 @@ int main(int argc, char **argv) continue; } if (readindividualtimes(curprivs, tmpfd) < 0) { - errstr(_("Can't read individual grace times from file.\n")); + errstr(_("Cannot read individual grace times from file.\n")); ret = -1; continue; } @@ -242,7 +242,7 @@ int main(int argc, char **argv) id = name2id(*argv, quotatype, NULL); curprivs = getprivs(id, handles, 0); if (writeprivs(curprivs, tmpfd, *argv, quotatype) < 0) { - errstr(_("Can't write quotas to file.\n")); + errstr(_("Cannot write quotas to file.\n")); ret = -1; continue; } @@ -253,9 +253,9 @@ int main(int argc, char **argv) } close(tmpfd); if ((tmpfd = open(tmpfil, O_RDONLY)) < 0) - die(1, _("Can't reopen!")); + die(1, _("Cannot reopen!")); if (readprivs(curprivs, tmpfd) < 0) { - errstr(_("Can't read quotas from file.\n")); + errstr(_("Cannot read quotas from file.\n")); ret = -1; continue; } @@ -34,7 +34,7 @@ #ident "$Copyright: (c) 1980, 1990 Regents of the University of California. $" #ident "$Copyright: All rights reserved. $" -#ident "$Id: quota.c,v 1.18 2005/10/25 13:01:14 jkar8572 Exp $" +#ident "$Id: quota.c,v 1.19 2005/11/21 22:30:23 jkar8572 Exp $" /* * Disk quota reporting program. @@ -69,115 +69,34 @@ #define FL_QUIETREFUSE 64 #define FL_NOAUTOFS 128 #define FL_NOWRAP 256 +#define FL_FSLIST 512 int flags, fmt = -1; char *progname; -void usage(void); -int showquotas(int type, qid_t id); -void heading(int type, qid_t id, char *name, char *tag); - -int main(int argc, char **argv) -{ - int ngroups; - gid_t gidset[NGROUPS], *gidsetp; - int i, ret; - - gettexton(); - progname = basename(argv[0]); - - while ((ret = getopt(argc, argv, "guqvsVliQF:w")) != -1) { - switch (ret) { - case 'g': - flags |= FL_GROUP; - break; - case 'u': - flags |= FL_USER; - break; - case 'q': - flags |= FL_QUIET; - break; - case 'v': - flags |= FL_VERBOSE; - break; - case 'F': - if ((fmt = name2fmt(optarg)) == QF_ERROR) /* Error? */ - exit(1); - break; - case 's': - flags |= FL_SMARTSIZE; - break; - case 'l': - flags |= FL_LOCALONLY; - break; - case 'Q': - flags |= FL_QUIETREFUSE; - break; - case 'i': - flags |= FL_NOAUTOFS; - break; - case 'w': - flags |= FL_NOWRAP; - break; - case 'V': - version(); - exit(0); - default: - usage(); - } - } - argc -= optind; - argv += optind; - - if (!(flags & FL_USER) && !(flags & FL_GROUP)) - flags |= FL_USER; - init_kernel_interface(); - - ret = 0; - if (argc == 0) { - if (flags & FL_USER) - ret |= showquotas(USRQUOTA, getuid()); - if (flags & FL_GROUP) { - ngroups = sysconf(_SC_NGROUPS_MAX); - if (ngroups > NGROUPS) { - gidsetp = malloc(ngroups * sizeof(gid_t)); - if (!gidsetp) - die(1, _("quota: gid set allocation (%d): %s\n"), ngroups, strerror(errno)); - } else { - gidsetp = &gidset[0]; - } - ngroups = getgroups(ngroups, gidsetp); - if (ngroups < 0) - die(1, _("quota: getgroups(): %s\n"), strerror(errno)); - for (i = 0; i < ngroups; i++) - ret |= showquotas(GRPQUOTA, gidsetp[i]); - } - exit(ret); - } - - if ((flags & FL_USER) && (flags & FL_GROUP)) - usage(); - - if (flags & FL_USER) - for (; argc > 0; argc--, argv++) - ret |= showquotas(USRQUOTA, user2uid(*argv, NULL)); - else if (flags & FL_GROUP) - for (; argc > 0; argc--, argv++) - ret |= showquotas(GRPQUOTA, group2gid(*argv, NULL)); - return ret; -} - void usage(void) { - errstr( "%s%s%s", + errstr( "%s%s%s%s", _("Usage: quota [-guqvsw] [-l | -Q] [-i] [-F quotaformat]\n"), _("\tquota [-qvsw] [-l | -Q] [-i] [-F quotaformat] -u username ...\n"), - _("\tquota [-qvsw] [-l | -Q] [-i] [-F quotaformat] -g groupname ...\n")); + _("\tquota [-qvsw] [-l | -Q] [-i] [-F quotaformat] -g groupname ...\n"), + _("\tquota [-qvswugQ] [-F quotaformat] -f filesystem ...\n")); fprintf(stderr, _("Bugs to: %s\n"), MY_EMAIL); exit(1); } -int showquotas(int type, qid_t id) +void heading(int type, qid_t id, char *name, char *tag) +{ + printf(_("Disk quotas for %s %s (%cid %u): %s\n"), type2name(type), + name, *type2name(type), (uint) id, tag); + if (!(flags & FL_QUIET) && !tag[0]) { + printf("%15s%8s %7s%8s%8s%8s %7s%8s%8s\n", _("Filesystem"), + _("blocks"), _("quota"), _("limit"), _("grace"), + _("files"), _("quota"), _("limit"), _("grace")); + } +} + +int showquotas(int type, qid_t id, int mntcnt, char **mnt) { struct dquot *qlist, *q; char *msgi, *msgb; @@ -189,7 +108,7 @@ int showquotas(int type, qid_t id) time(&now); id2name(id, type, name); - handles = create_handle_list(0, NULL, type, fmt, IOI_READONLY, ((flags & FL_NOAUTOFS) ? MS_NO_AUTOFS : 0) | ((flags & FL_LOCALONLY) ? MS_LOCALONLY : 0)); + handles = create_handle_list(mntcnt, mnt, type, fmt, IOI_READONLY, ((flags & FL_NOAUTOFS) ? MS_NO_AUTOFS : 0) | ((flags & FL_LOCALONLY) ? MS_LOCALONLY : 0)); qlist = getprivs(id, handles, !!(flags & FL_QUIETREFUSE)); over = 0; for (q = qlist; q; q = q->dq_next) { @@ -272,13 +191,100 @@ int showquotas(int type, qid_t id) return over > 0 ? 1 : 0; } -void heading(int type, qid_t id, char *name, char *tag) +int main(int argc, char **argv) { - printf(_("Disk quotas for %s %s (%cid %u): %s\n"), type2name(type), - name, *type2name(type), (uint) id, tag); - if (!(flags & FL_QUIET) && !tag[0]) { - printf("%15s%8s %7s%8s%8s%8s %7s%8s%8s\n", _("Filesystem"), - _("blocks"), _("quota"), _("limit"), _("grace"), - _("files"), _("quota"), _("limit"), _("grace")); + int ngroups; + gid_t gidset[NGROUPS], *gidsetp; + int i, ret; + + gettexton(); + progname = basename(argv[0]); + + while ((ret = getopt(argc, argv, "guqvsVliQF:wf")) != -1) { + switch (ret) { + case 'g': + flags |= FL_GROUP; + break; + case 'u': + flags |= FL_USER; + break; + case 'q': + flags |= FL_QUIET; + break; + case 'v': + flags |= FL_VERBOSE; + break; + case 'F': + if ((fmt = name2fmt(optarg)) == QF_ERROR) /* Error? */ + exit(1); + break; + case 's': + flags |= FL_SMARTSIZE; + break; + case 'l': + flags |= FL_LOCALONLY; + break; + case 'Q': + flags |= FL_QUIETREFUSE; + break; + case 'i': + flags |= FL_NOAUTOFS; + break; + case 'w': + flags |= FL_NOWRAP; + break; + case 'f': + flags |= FL_FSLIST; + break; + case 'V': + version(); + exit(0); + default: + usage(); + } } + argc -= optind; + argv += optind; + + if (!(flags & FL_USER) && !(flags & FL_GROUP)) + flags |= FL_USER; + if (flags & FL_FSLIST && flags & (FL_LOCALONLY | FL_NOAUTOFS)) + errstr(_("Warning: Ignoring -%c when filesystem list specified.\n"), flags & FL_LOCALONLY ? 'l' : 'i'); + + init_kernel_interface(); + + ret = 0; + if (argc == 0 || flags & FL_FSLIST) { + if (flags & FL_FSLIST && argc == 0) + die(1, _("No filesystem specified.\n")); + if (flags & FL_USER) + ret |= showquotas(USRQUOTA, getuid(), argc, argv); + if (flags & FL_GROUP) { + ngroups = sysconf(_SC_NGROUPS_MAX); + if (ngroups > NGROUPS) { + gidsetp = malloc(ngroups * sizeof(gid_t)); + if (!gidsetp) + die(1, _("Gid set allocation (%d): %s\n"), ngroups, strerror(errno)); + } else { + gidsetp = &gidset[0]; + } + ngroups = getgroups(ngroups, gidsetp); + if (ngroups < 0) + die(1, _("getgroups(): %s\n"), strerror(errno)); + for (i = 0; i < ngroups; i++) + ret |= showquotas(GRPQUOTA, gidsetp[i], argc, argv); + } + exit(ret); + } + + if ((flags & FL_USER) && (flags & FL_GROUP)) + usage(); + + if (flags & FL_USER) + for (; argc > 0; argc--, argv++) + ret |= showquotas(USRQUOTA, user2uid(*argv, NULL), 0, NULL); + else if (flags & FL_GROUP) + for (; argc > 0; argc--, argv++) + ret |= showquotas(GRPQUOTA, group2gid(*argv, NULL), 0, NULL); + return ret; } diff --git a/quotacheck.c b/quotacheck.c index da6f80a..fb24b70 100644 --- a/quotacheck.c +++ b/quotacheck.c @@ -8,7 +8,7 @@ * New quota format implementation - Jan Kara <jack@suse.cz> - Sponsored by SuSE CR */ -#ident "$Id: quotacheck.c,v 1.49 2005/08/23 09:23:35 jkar8572 Exp $" +#ident "$Id: quotacheck.c,v 1.50 2005/11/21 22:30:23 jkar8572 Exp $" #include <dirent.h> #include <stdio.h> @@ -846,7 +846,7 @@ static void check_dir(struct mntent *mnt) if (lstat(mnt->mnt_dir, &st) < 0) die(2, _("Cannot stat mountpoint %s: %s\n"), mnt->mnt_dir, strerror(errno)); if (!S_ISDIR(st.st_mode)) - die(2, _("Mountpoint %s isn't a directory?!\n"), mnt->mnt_dir); + die(2, _("Mountpoint %s is not a directory?!\n"), mnt->mnt_dir); cur_dev = st.st_dev; files_done = dirs_done = 0; if (ucheck) @@ -994,7 +994,7 @@ static void check_all(void) int checked = 0; if (init_mounts_scan((flags & FL_ALL) ? 0 : 1, &mntpoint, 0) < 0) - die(2, _("Can't initialize mountpoint scan.\n")); + die(2, _("Cannot initialize mountpoint scan.\n")); while ((mnt = get_next_mount())) { if (flags & FL_ALL && flags & FL_NOROOT && !strcmp(mnt->mnt_dir, "/")) continue; @@ -1026,7 +1026,7 @@ static void check_all(void) } end_mounts_scan(); if (!checked && (!(flags & FL_ALL) || flags & (FL_VERBOSE | FL_DEBUG))) - errstr(_("Can't find filesystem to check or filesystem not mounted with quota option.\n")); + errstr(_("Cannot find filesystem to check or filesystem not mounted with quota option.\n")); } int main(int argc, char **argv) diff --git a/quotacheck_v1.c b/quotacheck_v1.c index 320a5dc..017e692 100644 --- a/quotacheck_v1.c +++ b/quotacheck_v1.c @@ -27,7 +27,7 @@ static void load_dquots(char *filename, int fd, int type) lseek(fd, 0, SEEK_SET); while ((err = read(fd, &ddqblk, sizeof(ddqblk)))) { if (err < 0) - die(1, _("Can't read entry for id %u from quotafile %s: %s\n"), (uint) id, + die(1, _("Cannot read entry for id %u from quotafile %s: %s\n"), (uint) id, filename, strerror(errno)); if (err != sizeof(ddqblk)) { errstr(_("Entry for id %u is truncated.\n"), @@ -63,11 +63,11 @@ static int check_info(char *filename, int fd, int type) lseek(fd, 0, SEEK_SET); err = read(fd, &ddqblk, sizeof(ddqblk)); if (err < 0) - die(1, _("Can't read first entry from quotafile %s: %s\n"), filename, + die(1, _("Cannot read first entry from quotafile %s: %s\n"), filename, strerror(errno)); if (err != sizeof(ddqblk)) { errstr( - _("WARNING - Quotafile %s was probably truncated. Can't save quota settings...\n"), + _("WARNING - Quotafile %s was probably truncated. Cannot save quota settings...\n"), filename); return -1; } diff --git a/quotacheck_v2.c b/quotacheck_v2.c index 23b5ff3..fe607a1 100644 --- a/quotacheck_v2.c +++ b/quotacheck_v2.c @@ -53,12 +53,12 @@ static int check_info(char *filename, int fd, int type) err = read(fd, &dinfo, sizeof(struct v2_disk_dqinfo)); if (err < 0) { - errstr(_("Can't read info from quota file %s: %s\n"), + errstr(_("Cannot read info from quota file %s: %s\n"), filename, strerror(errno)); return -1; } if (err != sizeof(struct v2_disk_dqinfo)) { - errstr(_("WARNING - Quota file %s was probably truncated. Can't save quota settings...\n"), + errstr(_("WARNING - Quota file %s was probably truncated. Cannot save quota settings...\n"), filename); return -1; } @@ -216,7 +216,7 @@ static void check_read_blk(int fd, uint blk, dqbuf_t buf) lseek(fd, blk << V2_DQBLKSIZE_BITS, SEEK_SET); rd = read(fd, buf, V2_DQBLKSIZE); if (rd < 0) - die(2, _("Can't read block %u: %s\n"), blk, strerror(errno)); + die(2, _("Cannot read block %u: %s\n"), blk, strerror(errno)); if (rd != V2_DQBLKSIZE) { debug(FL_VERBOSE | FL_DEBUG, _("Block %u is truncated.\n"), blk); memset(buf + rd, 0, V2_DQBLKSIZE - rd); @@ -302,9 +302,9 @@ static int check_header(char *filename, int fd, int type) lseek(fd, 0, SEEK_SET); err = read(fd, &head, sizeof(head)); if (err < 0) - die(1, _("Can't read header from quotafile %s: %s\n"), filename, strerror(errno)); + die(1, _("Cannot read header from quotafile %s: %s\n"), filename, strerror(errno)); if (err != sizeof(head)) { - errstr(_("WARNING - Quotafile %s was probably truncated. Can't save quota settings...\n"), + errstr(_("WARNING - Quotafile %s was probably truncated. Cannot save quota settings...\n"), filename); return -1; } @@ -337,7 +337,7 @@ int v2_buffer_file(char *filename, int fd, int type) if (check_tree_ref(0, V2_DQTREEOFF, blocks, 1, &corrupted, &lastblk) >= 0) ret = check_tree_blk(fd, V2_DQTREEOFF, 0, type, blocks, &corrupted, &lastblk); else - errstr(_("Can't gather quota data. Tree root node corrupted.\n")); + errstr(_("Cannot gather quota data. Tree root node corrupted.\n")); #ifdef DEBUG_MALLOC free_mem += (blocks + 7) >> 3; #endif @@ -102,7 +102,7 @@ struct quota_handle *init_io(struct mntent *mnt, int type, int fmt, int flags) if (!QIO_ENABLED(h) || flags & IOI_OPENFILE) { /* Need to open file? */ /* We still need to open file for operations like 'repquota' */ if ((fd = open(qfname, QIO_RO(h) ? O_RDONLY : O_RDWR)) < 0) { - errstr(_("Can't open quotafile %s: %s\n"), + errstr(_("Cannot open quotafile %s: %s\n"), qfname, strerror(errno)); goto out_handle; } @@ -125,7 +125,7 @@ struct quota_handle *init_io(struct mntent *mnt, int type, int fmt, int flags) memset(&h->qh_info, 0, sizeof(h->qh_info)); if (h->qh_ops->init_io && h->qh_ops->init_io(h) < 0) { - errstr(_("Can't initialize quota on %s: %s\n"), h->qh_quotadev, strerror(errno)); + errstr(_("Cannot initialize quota on %s: %s\n"), h->qh_quotadev, strerror(errno)); goto out_lock; } return h; @@ -163,7 +163,7 @@ struct quota_handle *new_io(struct mntent *mnt, int type, int fmt) sstrncat(namebuf, ".new", PATH_MAX); free(qfname); if ((fd = open(namebuf, O_RDWR | O_CREAT | O_EXCL, S_IRUSR | S_IWUSR)) < 0) { - errstr(_("Can't create new quotafile %s: %s\n"), + errstr(_("Cannot create new quotafile %s: %s\n"), namebuf, strerror(errno)); return NULL; } diff --git a/quotaio_v1.c b/quotaio_v1.c index d61546e..9ee0efc 100644 --- a/quotaio_v1.c +++ b/quotaio_v1.c @@ -34,7 +34,7 @@ #ident "$Copyright: (c) 1980, 1990 Regents of the University of California. $" #ident "$Copyright: All rights reserved. $" -#ident "$Id: quotaio_v1.c,v 1.14 2004/05/24 19:39:15 jkar8572 Exp $" +#ident "$Id: quotaio_v1.c,v 1.15 2005/11/21 22:30:23 jkar8572 Exp $" #include <unistd.h> #include <errno.h> @@ -353,7 +353,7 @@ static int v1_scan_dquots(struct quota_handle *h, int (*process_dquot) (struct d if (QIO_ENABLED(h)) /* Kernel uses same file? */ if (quotactl(QCMD((kernel_iface == IFACE_GENERIC) ? Q_SYNC : Q_6_5_SYNC, h->qh_type), h->qh_quotadev, 0, NULL) < 0) - die(4, _("Can't sync quotas on device %s: %s\n"), h->qh_quotadev, + die(4, _("Cannot sync quotas on device %s: %s\n"), h->qh_quotadev, strerror(errno)); memset(dquot, 0, sizeof(*dquot)); dquot->dq_h = h; diff --git a/quotaio_v2.c b/quotaio_v2.c index d947839..bf4aed0 100644 --- a/quotaio_v2.c +++ b/quotaio_v2.c @@ -273,7 +273,7 @@ static void read_blk(struct quota_handle *h, uint blk, dqbuf_t buf) lseek(h->qh_fd, blk << V2_DQBLKSIZE_BITS, SEEK_SET); err = read(h->qh_fd, buf, V2_DQBLKSIZE); if (err < 0) - die(2, _("Can't read block %u: %s\n"), blk, strerror(errno)); + die(2, _("Cannot read block %u: %s\n"), blk, strerror(errno)); else if (err != V2_DQBLKSIZE) memset(buf + err, 0, V2_DQBLKSIZE - err); } @@ -286,7 +286,7 @@ static int write_blk(struct quota_handle *h, uint blk, dqbuf_t buf) lseek(h->qh_fd, blk << V2_DQBLKSIZE_BITS, SEEK_SET); err = write(h->qh_fd, buf, V2_DQBLKSIZE); if (err < 0 && errno != ENOSPC) - die(2, _("Can't write block (%u): %s\n"), blk, strerror(errno)); + die(2, _("Cannot write block (%u): %s\n"), blk, strerror(errno)); if (err != V2_DQBLKSIZE) return -ENOSPC; return 0; @@ -309,7 +309,7 @@ static int get_free_dqblk(struct quota_handle *h) memset(buf, 0, V2_DQBLKSIZE); if (write_blk(h, info->dqi_blocks, buf) < 0) { /* Assure block allocation... */ freedqbuf(buf); - errstr(_("Can't allocate new quota block (out of disk space).\n")); + errstr(_("Cannot allocate new quota block (out of disk space).\n")); return -ENOSPC; } blk = info->dqi_blocks++; @@ -474,7 +474,7 @@ static inline void dq_insert_tree(struct quota_handle *h, struct dquot *dquot) int tmp = V2_DQTREEOFF; if (do_insert_tree(h, dquot, &tmp, 0) < 0) - die(2, _("Can't write quota (id %u): %s\n"), (uint) dquot->dq_id, strerror(errno)); + die(2, _("Cannot write quota (id %u): %s\n"), (uint) dquot->dq_id, strerror(errno)); } /* Write dquot to file */ @@ -659,7 +659,7 @@ static struct dquot *v2_read_dquot(struct quota_handle *h, qid_t id) if (ret != sizeof(struct v2_disk_dqblk)) { if (ret > 0) errno = EIO; - die(2, _("Can't read quota structure for id %u: %s\n"), dquot->dq_id, + die(2, _("Cannot read quota structure for id %u: %s\n"), dquot->dq_id, strerror(errno)); } v2_disk2memdqblk(&dquot->dq_dqb, &ddquot); @@ -803,7 +803,7 @@ static int v2_scan_dquots(struct quota_handle *h, int (*process_dquot) (struct d if (QIO_ENABLED(h)) /* Kernel uses same file? */ if (quotactl(QCMD((kernel_iface == IFACE_GENERIC) ? Q_SYNC : Q_6_5_SYNC, h->qh_type), h->qh_quotadev, 0, NULL) < 0) - die(4, _("Can't sync quotas on device %s: %s\n"), h->qh_quotadev, + die(4, _("Cannot sync quotas on device %s: %s\n"), h->qh_quotadev, strerror(errno)); lseek(h->qh_fd, V2_DQINFOOFF, SEEK_SET); if (read(h->qh_fd, &ddqinfo, sizeof(ddqinfo)) != sizeof(ddqinfo)) { @@ -34,7 +34,7 @@ #ident "$Copyright: (c) 1980, 1990 Regents of the University of California $" #ident "$Copyright: All rights reserved. $" -#ident "$Id: quotaon.c,v 1.20 2005/06/01 07:20:50 jkar8572 Exp $" +#ident "$Id: quotaon.c,v 1.21 2005/11/21 22:30:23 jkar8572 Exp $" /* * Turn quota on/off for a filesystem. @@ -111,7 +111,7 @@ static void parse_options(int argcnt, char **argstr) usage(); } if (fmt == QF_RPC) { - fputs(_("Can't turn on/off quotas via RPC.\n"), stderr); + fputs(_("Cannot turn on/off quotas via RPC.\n"), stderr); exit(1); } if (!(flags & (FL_USER | FL_GROUP))) @@ -139,7 +139,7 @@ static int newstate(struct mntent *mnt, int type, char *extra) if (!strcmp(mnt->mnt_type, MNTTYPE_XFS)) { /* XFS filesystem has special handling... */ if (!(kernel_formats & (1 << QF_XFS))) { - errstr(_("Can't change state of XFS quota. It's not compiled in kernel.\n")); + errstr(_("Cannot change state of XFS quota. It's not compiled in kernel.\n")); return 1; } if (kernel_formats & (1 << QF_XFS) && @@ -216,7 +216,7 @@ static int quotaonoff(char *quotadev, char *quotadir, char *quotafile, int type, } if (quotactl(qcmd, quotadev, kqf, (void *)quotafile) < 0) { if (errno == ENOENT) - errstr(_("can't find %s on %s [%s]\n"), quotafile, quotadev, quotadir); + errstr(_("cannot find %s on %s [%s]\n"), quotafile, quotadev, quotadir); else errstr(_("using %s on %s [%s]: %s\n"), quotafile, quotadev, quotadir, strerror(errno)); if (errno == EINVAL) @@ -326,7 +326,7 @@ int main(int argc, char **argv) while ((mnt = get_next_mount())) { if (nfs_fstype(mnt->mnt_type)) { if (!(flags & FL_ALL)) - fprintf(stderr, "%s: Quota can't be turned on on NFS filesystem\n", mnt->mnt_fsname); + fprintf(stderr, "%s: Quota cannot be turned on on NFS filesystem\n", mnt->mnt_fsname); continue; } @@ -34,7 +34,7 @@ #ident "$Copyright: (c) 1980, 1990 Regents of the University of California. $" #ident "$Copyright: All rights reserved. $" -#ident "$Id: quotaops.c,v 1.17 2005/09/20 10:50:53 jkar8572 Exp $" +#ident "$Id: quotaops.c,v 1.18 2005/11/21 22:30:23 jkar8572 Exp $" #include <rpc/rpc.h> #include <sys/types.h> @@ -176,7 +176,7 @@ int putprivs(struct dquot *qlist, int flags) for (q = qlist; q; q = q->dq_next) { if (q->dq_h->qh_ops->commit_dquot(q, flags) == -1) { - errstr(_("Can't write quota for %u on %s: %s\n"), + errstr(_("Cannot write quota for %u on %s: %s\n"), q->dq_id, q->dq_h->qh_quotadev, strerror(errno)); ret = -1; continue; @@ -201,7 +201,7 @@ int editprivs(char *tmpfile) sigaddset(&nmask, SIGHUP); sigprocmask(SIG_SETMASK, &nmask, &omask); if ((pid = fork()) < 0) { - errstr("Can't fork(): %s\n", strerror(errno)); + errstr("Cannot fork(): %s\n", strerror(errno)); return -1; } if (pid == 0) { @@ -233,7 +233,7 @@ int editprivs(char *tmpfile) edpars[i++] = tmpfile; edpars[i] = NULL; execvp(edpars[0], edpars); - die(1, _("Can't exec %s\n"), ed); + die(1, _("Cannot exec %s\n"), ed); } waitpid(pid, &stat, 0); sigprocmask(SIG_SETMASK, &omask, NULL); @@ -252,7 +252,7 @@ int writeprivs(struct dquot *qlist, int outfd, char *name, int quotatype) ftruncate(outfd, 0); lseek(outfd, 0, SEEK_SET); if (!(fd = fdopen(dup(outfd), "w"))) - die(1, _("Can't duplicate descriptor of file to write to: %s\n"), strerror(errno)); + die(1, _("Cannot duplicate descriptor of file to write to: %s\n"), strerror(errno)); #if defined(ALT_FORMAT) fprintf(fd, _("Disk quotas for %s %s (%cid %d):\n"), @@ -330,7 +330,7 @@ int readprivs(struct dquot *qlist, int infd) lseek(infd, 0, SEEK_SET); if (!(fd = fdopen(dup(infd), "r"))) - die(1, _("Can't duplicate descriptor of temp file: %s\n"), strerror(errno)); + die(1, _("Cannot duplicate descriptor of temp file: %s\n"), strerror(errno)); #if defined(ALT_FORMAT) /* @@ -437,7 +437,7 @@ int writeindividualtimes(struct dquot *qlist, int outfd, char *name, int quotaty ftruncate(outfd, 0); lseek(outfd, 0, SEEK_SET); if (!(fd = fdopen(dup(outfd), "w"))) - die(1, _("Can't duplicate descriptor of file to write to: %s\n"), strerror(errno)); + die(1, _("Cannot duplicate descriptor of file to write to: %s\n"), strerror(errno)); fprintf(fd, _("Times to enforce softlimit for %s %s (%cid %d):\n"), type2name(quotatype), name, *type2name(quotatype), name2id(name, quotatype, NULL)); @@ -479,7 +479,7 @@ int readindividualtimes(struct dquot *qlist, int infd) lseek(infd, 0, SEEK_SET); if (!(fd = fdopen(dup(infd), "r"))) - die(1, _("Can't duplicate descriptor of temp file: %s\n"), strerror(errno)); + die(1, _("Cannot duplicate descriptor of temp file: %s\n"), strerror(errno)); /* * Discard title lines, then read lines to process. @@ -539,7 +539,7 @@ int writetimes(struct quota_handle **handles, int outfd) ftruncate(outfd, 0); lseek(outfd, 0, SEEK_SET); if ((fd = fdopen(dup(outfd), "w")) == NULL) - die(1, _("Can't duplicate descriptor of file to edit: %s\n"), strerror(errno)); + die(1, _("Cannot duplicate descriptor of file to edit: %s\n"), strerror(errno)); #if defined(ALT_FORMAT) fprintf(fd, _("Grace period before enforcing soft limits for %ss:\n"), @@ -587,7 +587,7 @@ int readtimes(struct quota_handle **handles, int infd) return 0; lseek(infd, 0, SEEK_SET); if (!(fd = fdopen(dup(infd), "r"))) { - errstr(_("Can't reopen temp file: %s\n"), + errstr(_("Cannot reopen temp file: %s\n"), strerror(errno)); return -1; } diff --git a/quotastats.c b/quotastats.c index 92ae9c7..7aaf8c9 100644 --- a/quotastats.c +++ b/quotastats.c @@ -10,7 +10,7 @@ * * Author: Marco van Wieringen <mvw@planets.elm.net> * - * Version: $Id: quotastats.c,v 1.10 2002/06/16 19:00:46 jkar8572 Exp $ + * Version: $Id: quotastats.c,v 1.11 2005/11/21 22:30:23 jkar8572 Exp $ * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License as @@ -45,7 +45,7 @@ static int get_proc_num(char *name) sstrncat(namebuf, name, PATH_MAX); if (!(f = fopen(namebuf, "r"))) { - errstr(_("Can't read stat file %s: %s\n"), namebuf, strerror(errno)); + errstr(_("Cannot read stat file %s: %s\n"), namebuf, strerror(errno)); return -1; } fscanf(f, "%d", &ret); @@ -102,7 +102,7 @@ uid_t user2uid(char *name, int *err) return ret; if (!(entry = getpwnam(name))) { if (!err) { - errstr(_("User %s doesn't exist.\n"), name); + errstr(_("user %s does not exist.\n"), name); exit(1); } else { @@ -129,7 +129,7 @@ gid_t group2gid(char *name, int *err) return ret; if (!(entry = getgrnam(name))) { if (!err) { - errstr(_("Group %s doesn't exist.\n"), name); + errstr(_("group %s does not exist.\n"), name); exit(1); } else { @@ -469,7 +469,7 @@ static int check_fmtfile_ok(char *name, int type, int fmt, int flags) if (stat(name, &st) < 0) { if (errno != ENOENT) - errstr(_("Can't stat quota file %s: %s\n"), name, strerror(errno)); + errstr(_("Cannot stat quota file %s: %s\n"), name, strerror(errno)); return 0; } return 1; @@ -485,7 +485,7 @@ static int check_fmtfile_ok(char *name, int type, int fmt, int flags) close(fd); } else if (errno != ENOENT && errno != EPERM) - errstr(_("Can't open quotafile %s: %s\n"), name, strerror(errno)); + errstr(_("Cannot open quotafile %s: %s\n"), name, strerror(errno)); return ret; } } @@ -571,7 +571,7 @@ struct quota_handle **create_handle_list(int count, char **mntpoints, int type, } if (init_mounts_scan(count, mntpoints, mntflags) < 0) - die(2, _("Can't initialize mountpoint scan.\n")); + die(2, _("Cannot initialize mountpoint scan.\n")); while ((mnt = get_next_mount())) { if (!nfs_fstype(mnt->mnt_type)) { /* No NFS? */ add_entry: @@ -663,10 +663,10 @@ void init_kernel_interface(void) sig.sa_handler = SIG_IGN; sig.sa_sigaction = NULL; if (sigemptyset(&sig.sa_mask) < 0) - die(2, _("Can't create set for sigaction(): %s\n"), strerror(errno)); + die(2, _("Cannot create set for sigaction(): %s\n"), strerror(errno)); sig.sa_flags = 0; if (sigaction(SIGSEGV, &sig, &oldsig) < 0) - die(2, _("Can't set signal handler: %s\n"), strerror(errno)); + die(2, _("Cannot set signal handler: %s\n"), strerror(errno)); kernel_formats = 0; if (!stat("/proc/fs/xfs/stat", &st)) @@ -713,7 +713,7 @@ void init_kernel_interface(void) } } if (sigaction(SIGSEGV, &oldsig, NULL) < 0) - die(2, _("Can't reset signal handler: %s\n"), strerror(errno)); + die(2, _("Cannot reset signal handler: %s\n"), strerror(errno)); } /* Check whether old quota is turned on on given device */ @@ -822,12 +822,12 @@ static int cache_mnt_table(int flags) if (!(mntf = setmntent(_PATH_MOUNTED, "r"))) { if (errno != ENOENT) { - errstr(_("Can't open %s: %s\n"), _PATH_MOUNTED, strerror(errno)); + errstr(_("Cannot open %s: %s\n"), _PATH_MOUNTED, strerror(errno)); return -1; } else /* Fallback on fstab when mtab not available */ if (!(mntf = setmntent(_PATH_MNTTAB, "r"))) { - errstr(_("Can't open %s: %s\n"), _PATH_MNTTAB, strerror(errno)); + errstr(_("Cannot open %s: %s\n"), _PATH_MNTTAB, strerror(errno)); return -1; } } @@ -838,7 +838,7 @@ static int cache_mnt_table(int flags) const char *devname; if (!(devname = get_device_name(mnt->mnt_fsname))) { - errstr(_("Can't get device name for %s\n"), mnt->mnt_fsname); + errstr(_("Cannot get device name for %s\n"), mnt->mnt_fsname); continue; } @@ -875,13 +875,13 @@ static int cache_mnt_table(int flags) } if (!realpath(mnt->mnt_dir, mntpointbuf)) { - errstr(_("Can't resolve mountpoint path %s: %s\n"), mnt->mnt_dir, strerror(errno)); + errstr(_("Cannot resolve mountpoint path %s: %s\n"), mnt->mnt_dir, strerror(errno)); free((char *)devname); continue; } if (statfs(mntpointbuf, &fsstat) != 0) { - errstr(_("Can't statfs() %s: %s\n"), mntpointbuf, strerror(errno)); + errstr(_("Cannot statfs() %s: %s\n"), mntpointbuf, strerror(errno)); free((char *)devname); continue; } @@ -893,7 +893,7 @@ static int cache_mnt_table(int flags) if (!nfs_fstype(mnt->mnt_type)) { if (stat(devname, &st) < 0) { /* Can't stat mounted device? */ - errstr(_("Can't stat() mounted device %s: %s\n"), devname, strerror(errno)); + errstr(_("Cannot stat() mounted device %s: %s\n"), devname, strerror(errno)); free((char *)devname); continue; } @@ -914,7 +914,7 @@ static int cache_mnt_table(int flags) int i; if (!(opt = strchr(opt, '='))) { - errstr(_("Can't find device of loopback mount in options for %s. Skipping.\n"), devname); + errstr(_("Cannot find device of loopback mount in options for %s. Skipping.\n"), devname); free((char *)devname); continue; } @@ -923,12 +923,12 @@ static int cache_mnt_table(int flags) loopdev[i] = *opt; loopdev[i] = 0; if (stat(loopdev, &st) < 0) { /* Can't stat loopback device? */ - errstr(_("Can't stat() loopback device %s: %s\n"), opt, strerror(errno)); + errstr(_("Cannot stat() loopback device %s: %s\n"), opt, strerror(errno)); free((char *)devname); continue; } if (!S_ISBLK(st.st_mode)) { - errstr(_("Loopback device %s isn't block device!\n"), opt); + errstr(_("Loopback device %s is not block device!\n"), opt); free((char *)devname); continue; } @@ -946,7 +946,7 @@ static int cache_mnt_table(int flags) /* Cope with network filesystems or new mountpoint */ if (nfs_fstype(mnt->mnt_type) || i == mnt_entries_cnt) { if (stat(mnt->mnt_dir, &st) < 0) { /* Can't stat mountpoint? We have better ignore it... */ - errstr(_("Can't stat() mountpoint %s: %s\n"), mnt->mnt_dir, strerror(errno)); + errstr(_("Cannot stat() mountpoint %s: %s\n"), mnt->mnt_dir, strerror(errno)); free((char *)devname); continue; } @@ -1006,11 +1006,11 @@ static int process_dirs(int dcnt, char **dirs, int flags) char *devname = (char *)get_device_name(dirs[i]); if (!devname) { - errstr(_("Can't find a device with %s.\nSkipping...\n"), dirs[i]); + errstr(_("Cannot find a device with %s.\nSkipping...\n"), dirs[i]); continue; } if (stat(devname, &st) < 0) { - errstr(_("Can't stat() a mountpoint with %s: %s\nSkipping...\n"), dirs[i], strerror(errno)); + errstr(_("Cannot stat() a mountpoint with %s: %s\nSkipping...\n"), dirs[i], strerror(errno)); free(devname); continue; } @@ -1018,7 +1018,7 @@ static int process_dirs(int dcnt, char **dirs, int flags) } else if (stat(dirs[i], &st) < 0) { - errstr(_("Can't stat() given mountpoint %s: %s\nSkipping...\n"), dirs[i], strerror(errno)); + errstr(_("Cannot stat() given mountpoint %s: %s\nSkipping...\n"), dirs[i], strerror(errno)); continue; } check_dirs[check_dirs_cnt].sd_dir = S_ISDIR(st.st_mode); @@ -1028,13 +1028,13 @@ static int process_dirs(int dcnt, char **dirs, int flags) /* Return st of mountpoint of dir in st.. */ if (flags & MS_NO_MNTPOINT && !(realmnt = find_dir_mntpoint(&st))) { if (!(flags & MS_QUIET)) - errstr(_("Can't find a filesystem mountpoint for directory %s\n"), dirs[i]); + errstr(_("Cannot find a filesystem mountpoint for directory %s\n"), dirs[i]); continue; } check_dirs[check_dirs_cnt].sd_dev = st.st_dev; check_dirs[check_dirs_cnt].sd_ino = st.st_ino; if (!realpath(realmnt, mntpointbuf)) { - errstr(_("Can't resolve path %s: %s\n"), realmnt, strerror(errno)); + errstr(_("Cannot resolve path %s: %s\n"), realmnt, strerror(errno)); continue; } } @@ -1045,7 +1045,7 @@ static int process_dirs(int dcnt, char **dirs, int flags) for (mentry = 0; mentry < mnt_entries_cnt && mnt_entries[mentry].me_dev != st.st_rdev; mentry++); if (mentry == mnt_entries_cnt) { if (!(flags & MS_QUIET)) - errstr(_("Can't find mountpoint for device %s\n"), dirs[i]); + errstr(_("Cannot find mountpoint for device %s\n"), dirs[i]); continue; } sstrncpy(mntpointbuf, mnt_entries[mentry].me_dir, PATH_MAX-1); @@ -105,7 +105,7 @@ static void parse_options(int argcnt, char **argstr) usage(); } if (fmt == QF_RPC) { - fputs(_("Repquota can't report through RPC calls.\n"), stderr); + fputs(_("Repquota cannot report through RPC calls.\n"), stderr); exit(1); } if (flags & FL_NONAME && flags & FL_TRUNCNAMES) { @@ -325,7 +325,7 @@ static int setindivgraces(struct quota_handle **handles) q->dq_dqb.dqb_itime = toset.dqb_itime; } if (putprivs(curprivs, COMMIT_TIMES) == -1) { - errstr(_("Can't write times for %s. Maybe kernel doesn't support such operation?\n"), type2name(flags & FL_USER ? USRQUOTA : GRPQUOTA)); + errstr(_("cannot write times for %s. Maybe kernel does not support such operation?\n"), type2name(flags & FL_USER ? USRQUOTA : GRPQUOTA)); ret = -1; } freeprivs(curprivs); diff --git a/warnquota.c b/warnquota.c index b009f52..79f4084 100644 --- a/warnquota.c +++ b/warnquota.c @@ -10,7 +10,7 @@ * * Author: Marco van Wieringen <mvw@planets.elm.net> * - * Version: $Id: warnquota.c,v 1.24 2005/10/25 13:01:14 jkar8572 Exp $ + * Version: $Id: warnquota.c,v 1.25 2005/11/21 22:30:23 jkar8572 Exp $ * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License as @@ -193,7 +193,7 @@ static struct offenderlist *add_offender(int type, int id, char *name) if (!name) { if (id2name(id, type, namebuf)) { - errstr(_("Can't get name for uid/gid %u.\n"), id); + errstr(_("Cannot get name for uid/gid %u.\n"), id); return NULL; } name = namebuf; @@ -277,27 +277,27 @@ static FILE *run_mailer(char *command) FILE *f; if (pipe(pipefd) < 0) { - errstr(_("Can't create pipe: %s\n"), strerror(errno)); + errstr(_("Cannot create pipe: %s\n"), strerror(errno)); return NULL; } signal(SIGPIPE, SIG_IGN); switch(fork()) { case -1: - errstr(_("Can't fork: %s\n"), strerror(errno)); + errstr(_("Cannot fork: %s\n"), strerror(errno)); return NULL; case 0: close(pipefd[1]); if (dup2(pipefd[0], 0) < 0) { - errstr(_("Can't duplicate descriptor: %s\n"), strerror(errno)); + errstr(_("Cannot duplicate descriptor: %s\n"), strerror(errno)); wc_exit(1); } execl(SHELL, SHELL, "-c", command, NULL); - errstr(_("Can't execute '%s': %s\n"), command, strerror(errno)); + errstr(_("Cannot execute '%s': %s\n"), command, strerror(errno)); wc_exit(1); default: close(pipefd[0]); if (!(f = fdopen(pipefd[1], "w"))) - errstr(_("Can't open pine: %s\n"), strerror(errno)); + errstr(_("Cannot open pine: %s\n"), strerror(errno)); return f; } } @@ -531,7 +531,7 @@ static int mail_user(struct offenderlist *offender, struct configparams *config) fprintf(fp, DEF_GROUP_SIGNATURE, config->support, config->phone); fclose(fp); if (wait(&status) < 0) /* Wait for mailer */ - errstr(_("Can't wait for mailer: %s\n"), strerror(errno)); + errstr(_("Cannot wait for mailer: %s\n"), strerror(errno)); else if (!WIFEXITED(status) || WEXITSTATUS(status) != 0) errstr(_("Warning: Mailer exitted abnormally.\n")); @@ -590,7 +590,7 @@ static int get_quotatable(void) struct stat st; if (!(fp = fopen(quotatabfile, "r"))) { - errstr(_("Can't open %s: %s\nWill use device names.\n"), quotatabfile, strerror(errno)); + errstr(_("Cannot open %s: %s\nWill use device names.\n"), quotatabfile, strerror(errno)); qtab_i = 0; return 0; } @@ -613,7 +613,7 @@ static int get_quotatable(void) } /* Parse line */ if (!(colpos = strchr(buffer, ':'))) { - errstr(_("Can't parse line %d in quotatab (missing ':')\n"), line); + errstr(_("Cannot parse line %d in quotatab (missing ':')\n"), line); qtab_i--; continue; } @@ -627,7 +627,7 @@ static int get_quotatable(void) create_eoln(quotatable[qtab_i].devdesc); if (stat(quotatable[qtab_i].devname, &st) < 0) - errstr(_("Can't stat device %s (maybe typo in quotatab)\n"), quotatable[qtab_i].devname); + errstr(_("Cannot stat device %s (maybe typo in quotatab)\n"), quotatable[qtab_i].devname); } fclose(fp); return 0; @@ -683,7 +683,7 @@ static int readconfigfile(const char *filename, struct configparams *config) #endif if (!(fp = fopen(filename, "r"))) { - errstr(_("Can't open %s: %s\n"), filename, strerror(errno)); + errstr(_("Cannot open %s: %s\n"), filename, strerror(errno)); return -1; } @@ -820,7 +820,7 @@ static int get_groupadmins(void) char buffer[IOBUF_SIZE], *colpos, *grouppos, *endname, *adminpos; if (!(f = fopen(adminsfile, "r"))) { - errstr(_("Can't open file with group administrators: %s\n"), strerror(errno)); + errstr(_("Cannot open file with group administrators: %s\n"), strerror(errno)); return -1; } @@ -835,7 +835,7 @@ static int get_groupadmins(void) /* Find splitting colon */ for (grouppos = colpos; *colpos && *colpos != ':'; colpos++); if (!*colpos || grouppos == colpos) { - errstr(_("Parse error at line %d. Can't find end of group name.\n"), line); + errstr(_("Parse error at line %d. Cannot find end of group name.\n"), line); continue; } /* Cut trailing spaces */ @@ -844,7 +844,7 @@ static int get_groupadmins(void) /* Skip initial spaces at admins name */ for (colpos++; isspace(*colpos); colpos++); if (!*colpos) { - errstr(_("Parse error at line %d. Can't find administrators name.\n"), line); + errstr(_("Parse error at line %d. Cannot find administrators name.\n"), line); continue; } /* Go through admins name */ |