summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorjkar8572 <jkar8572>2010-01-05 11:28:26 +0000
committerjkar8572 <jkar8572>2010-01-05 11:28:26 +0000
commit077c4c5cd183f46e89f6cb5b1269019235bb9b8a (patch)
tree083b5665c736c443e806692c613adf2c235f3e33
parent3786e49ea95fd4091d2a96b2db6104b225e44f2f (diff)
downloadlinuxquota-077c4c5cd183f46e89f6cb5b1269019235bb9b8a.tar.gz
* Improved manpage of quota_nld (Eddie)
* Fixed long option handling of quota_nld (Jan Kara)
-rw-r--r--Changelog2
-rw-r--r--quota_nld.847
-rw-r--r--quota_nld.c19
3 files changed, 49 insertions, 19 deletions
diff --git a/Changelog b/Changelog
index 9b4f1dc..4326482 100644
--- a/Changelog
+++ b/Changelog
@@ -1,4 +1,6 @@
Changes in quota-tools from 3.17 to 4.00-pre1
+* Improved manpage of quota_nld (Eddie)
+* Fixed long option handling of quota_nld (Jan Kara)
* Fixed error reporting when rpc format specified on command line (Jan Kara)
* Convert quota limits using rq_bsize from RPC request (Jan Kara)
* Added noreturn attribute to die to avoid false warnings (Jan Kara)
diff --git a/quota_nld.8 b/quota_nld.8
index bc84c6e..bd85407 100644
--- a/quota_nld.8
+++ b/quota_nld.8
@@ -3,27 +3,54 @@
quota_nld \- quota netlink message daemon
.SH SYNOPSIS
.B quota_nld
-[
-.B \-DCn
-]
+[[
+.B \-D
+|
+.B \-C
+][
+.B \-F
+][
+.B \-b
+]]
.SH DESCRIPTION
.BR quota_nld
-is a daemon that listens on netlink socket and processes received quota
-warnings. Note, that you have to enable the kernel support for sending quota
-messages over netlink (in Filesystems->Quota menu). The daemon supports
-forwarding warning messages to the system's DBUS (so that desktop manager
-can display a dialog) and writing them to the terminal user has last accessed.
+listens on netlink socket and processes received quota
+warnings. By default
+.BR quota_nld
+forwards warning messages to both the system's DBUS (so that the desktop
+manager can display a dialog) and the last-accessed terminal of the user to
+whom each warning is directed. Either of these destinations can be disabled
+with the
+.B \-D
+and
+.B \-C
+options, respectively.
+
+In the case of the user's terminal, quota messages about falling below
+the hard and soft limits are not sent unless the
+.B \-b
+option is specified. In the case of the DBUS, all quota messages are sent.
+
+Note, that you have to enable the kernel support for sending quota
+messages over netlink (in Filesystems->Quota menu).
.SH OPTIONS
.TP
.B \-V, \-\-version
-Shows version of quota tools.
+Shows version of quota tools and exit.
+.TP
+.B \-h, \-\-help
+Show a usage message and exit
.TP
.B \-D, \-\-no-dbus
Do not forward quota warnings to DBUS.
.TP
.B \-C, \-\-no-console
-Do not print quota warnings to the terminal.
+Do not print quota warnings to the user's last-accessed terminal.
+.TP
+.B \-b, \-\-print-below
+If quota warnings are printed to users' terminals, include
+messages about falling below their hard and soft limits.
.TP
.B \-F, \-\-foreground
Run daemon in foreground (may be useful for debugging purposes).
diff --git a/quota_nld.c b/quota_nld.c
index 6c08d56..a8c8d34 100644
--- a/quota_nld.c
+++ b/quota_nld.c
@@ -36,15 +36,6 @@
char *progname;
-static const struct option options[] = {
- { "version", 0, NULL, 'V' },
- { "help", 0, NULL, 'h' },
- { "no-dbus", 0, NULL, 'D' },
- { "no-console", 0, NULL, 'C' },
- { "no-daemon", 0, NULL, 'F' },
- { NULL, 0, NULL, 0 }
-};
-
struct quota_warning {
uint32_t qtype;
uint64_t excess_id;
@@ -72,6 +63,16 @@ static struct nla_policy quota_nl_warn_cmd_policy[QUOTA_NL_A_MAX+1] = {
int flags;
DBusConnection *dhandle;
+static const struct option options[] = {
+ { "version", 0, NULL, 'V' },
+ { "help", 0, NULL, 'h' },
+ { "no-dbus", 0, NULL, 'D' },
+ { "no-console", 0, NULL, 'C' },
+ { "foreground", 0, NULL, 'F' },
+ { "print-below", 0, NULL, 'b' },
+ { NULL, 0, NULL, 0 }
+};
+
void show_help(void)
{
errstr(_("Usage: %s [options]\nOptions are:\n\