You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
53 lines
1.8 KiB
53 lines
1.8 KiB
From c18e5a1b1e51c0382f5d1431120fe65f7e9c982c Mon Sep 17 00:00:00 2001
|
|
From: Carlos Maiolino <cem@kernel.org>
|
|
Date: Fri, 26 Jan 2024 19:02:09 +0100
|
|
Subject: [PATCH 1/3] Rename searched_dir->sd_dir to sd_isdir
|
|
|
|
The field holds information if we are searching a directory mountpoint or a
|
|
device, rename the field to something more meaningful.
|
|
|
|
We could switch it to bool, but it seems pointless to include a whole header
|
|
just for it, so keep the int type.
|
|
|
|
Signed-off-by: Carlos Maiolino <cmaiolino@redhat.com>
|
|
Signed-off-by: Jan Kara <jack@suse.cz>
|
|
Signed-off-by: Pavel Reichl <preichl@redhat.com>
|
|
---
|
|
quotasys.c | 6 +++---
|
|
1 file changed, 3 insertions(+), 3 deletions(-)
|
|
|
|
diff --git a/quotasys.c b/quotasys.c
|
|
index 3f50e32..9af9932 100644
|
|
--- a/quotasys.c
|
|
+++ b/quotasys.c
|
|
@@ -1223,7 +1223,7 @@ int kern_quota_on(struct mount_entry *mnt, int type, int fmt)
|
|
*/
|
|
|
|
struct searched_dir {
|
|
- int sd_dir; /* Is searched dir mountpoint or in fact device? */
|
|
+ int sd_isdir; /* Is searched dir mountpoint or in fact device? */
|
|
dev_t sd_dev; /* Device mountpoint lies on */
|
|
ino_t sd_ino; /* Inode number of mountpoint */
|
|
const char *sd_name; /* Name of given dir/device */
|
|
@@ -1454,7 +1454,7 @@ static int process_dirs(int dcnt, char **dirs, int flags)
|
|
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);
|
|
+ check_dirs[check_dirs_cnt].sd_isdir = S_ISDIR(st.st_mode);
|
|
if (S_ISDIR(st.st_mode)) {
|
|
const char *realmnt = dirs[i];
|
|
|
|
@@ -1538,7 +1538,7 @@ restart:
|
|
return 0;
|
|
sd = check_dirs + act_checked;
|
|
for (i = 0; i < mnt_entries_cnt; i++) {
|
|
- if (sd->sd_dir) {
|
|
+ if (sd->sd_isdir) {
|
|
if (sd->sd_dev == mnt_entries[i].me_dev && sd->sd_ino == mnt_entries[i].me_ino)
|
|
break;
|
|
}
|
|
--
|
|
2.45.2
|
|
|