diff options
author | Masatake YAMATO <yamato@redhat.com> | 2015-12-16 18:10:00 +0100 |
---|---|---|
committer | Jan Kara <jack@suse.cz> | 2015-12-16 18:10:00 +0100 |
commit | 50dd12cfdbffea08b01a95ebfbc6eeb1d648c592 (patch) | |
tree | dc12cd5f25734a04c5e0d80e3d3e7ff2a5829d0d | |
parent | b971998d92381492e3d182987356fb3dbaed5f3a (diff) | |
download | linuxquota-50dd12cfdbffea08b01a95ebfbc6eeb1d648c592.tar.gz |
quota_nld: multicast project quota warnings via dbus
Quota subsystem in kernel introduced project quota. This patch improves
the userspace side.
This patch prevents quota_nld writing warnings to a console when
receiving project quota warnings from kernel because there is no such
concept, "console associated with a project id".
Signed-off-by: Masatake YAMATO <yamato@redhat.com>
Signed-off-by: Jan Kara <jack@suse.cz>
-rw-r--r-- | quota.h | 1 | ||||
-rw-r--r-- | quota_nld.c | 2 |
2 files changed, 2 insertions, 1 deletions
@@ -11,6 +11,7 @@ typedef int64_t qsize_t; /* Type in which we store size limitations */ #define MAXQUOTAS 2 #define USRQUOTA 0 /* element used for user quotas */ #define GRPQUOTA 1 /* element used for group quotas */ +#define PRJQUOTA 2 /* element used for project quotas */ /* * Definitions for the default names of the quotas files. diff --git a/quota_nld.c b/quota_nld.c index ad5c57e..ea541e0 100644 --- a/quota_nld.c +++ b/quota_nld.c @@ -165,7 +165,7 @@ static int quota_nl_parser(struct nl_msg *msg, void *arg) warn.dev_minor = nla_get_u32(attrs[QUOTA_NL_A_DEV_MINOR]); warn.caused_id = nla_get_u64(attrs[QUOTA_NL_A_CAUSED_ID]); - if (!(flags & FL_NOCONSOLE)) + if (!(flags & FL_NOCONSOLE) && warn.qtype != PRJQUOTA) write_console_warning(&warn); if (!(flags & FL_NODBUS)) write_dbus_warning(dhandle, &warn); |