]> git.pld-linux.org Git - packages/quota.git/blob - quota-warnquota_nodetails.patch
- -d option for warnquota (don't attach quota report in email)
[packages/quota.git] / quota-warnquota_nodetails.patch
1 --- quota-tools/warnquota.c.orig        Thu Oct  2 13:53:57 2003
2 +++ quota-tools/warnquota.c     Thu Oct  2 14:02:41 2003
3 @@ -76,6 +76,7 @@
4  #define FL_USER 1
5  #define FL_GROUP 2
6  #define FL_NOAUTOFS 4
7 +#define FL_NODETAILS 8
8  
9  struct usage {
10         char *devicename;
11 @@ -255,7 +256,7 @@
12                 else
13                         fprintf(fp, DEF_GROUP_MESSAGE, offender->offender_name);
14  
15 -       for (lptr = offender->usage; lptr; lptr = lptr->next) {
16 +       for (lptr = offender->usage; !(flags & FL_NODETAILS) && lptr; lptr = lptr->next) {
17                 dqb = &lptr->dq_dqb;
18                 for (cnt = 0; cnt < qtab_i; cnt++)
19                         if (!strcmp(quotatable[cnt].devname, lptr->devicename)) {
20 @@ -599,14 +600,14 @@
21  /* Print usage information */
22  static void usage(void)
23  {
24 -       errstr(_("Usage:\n  warnquota [-ugi] [-F quotaformat] [-c configfile] [-q quotatabfile]\n"));
25 +       errstr(_("Usage:\n  warnquota [-ugid] [-F quotaformat] [-c configfile] [-q quotatabfile]\n"));
26  }
27   
28  static void parse_options(int argcnt, char **argstr)
29  {
30         int ret;
31   
32 -       while ((ret = getopt(argcnt, argstr, "ugVF:hc:q:a:i")) != -1) {
33 +       while ((ret = getopt(argcnt, argstr, "ugVF:hc:q:a:id")) != -1) {
34                 switch (ret) {
35                   case '?':
36                   case 'h':
37 @@ -636,6 +637,9 @@
38                   case 'i':
39                         flags |= FL_NOAUTOFS;
40                         break;
41 +                 case 'd':
42 +                       flags |= FL_NODETAILS;
43 +                       break;
44                 }
45         }
46         if (!(flags & FL_USER) && !(flags & FL_GROUP))
47 --- quota-tools/warnquota.8.orig        Thu Oct  2 14:55:45 2003
48 +++ quota-tools/warnquota.8     Thu Oct  2 14:58:05 2003
49 @@ -4,7 +4,7 @@
50  .SH SYNOPSIS
51  .B warnquota
52  [
53 -.B \-ugi
54 +.B \-ugid
55  ] [
56  .B \-F
57  .I quotaformat
58 @@ -67,6 +67,9 @@
59  .TP
60  .B \-i
61  ignore mountpoints mounted by automounter.
62 +.TP
63 +.B -d
64 +don't attach quota report in email.
65  .SH FILES
66  .PD 0
67  .TP 20
This page took 0.06517 seconds and 3 git commands to generate.