Instead of making a type up, just use __SWORD_TYPE, after reading
statfs(2).

Too bad, this does not fix s390x because __SWORD_TYPE is (long int) and
the kernel uses (int) to fill in the field!!!!!!
This commit is contained in:
Harald Hoyer
2013-04-17 19:00:50 +02:00
parent 9e6d4c613d
commit c4073a27c5
3 changed files with 8 additions and 8 deletions
+2 -2
View File
@@ -2779,8 +2779,8 @@ int rm_rf_children_dangerous(int fd, bool only_dirs, bool honour_sticky, struct
static int is_temporary_fs(struct statfs *s) {
assert(s);
return (unsigned long) s->f_type == TMPFS_MAGIC ||
(unsigned long) s->f_type == RAMFS_MAGIC;
return (unsigned __SWORD_TYPE) s->f_type == TMPFS_MAGIC ||
(unsigned __SWORD_TYPE) s->f_type == RAMFS_MAGIC;
}
int rm_rf_children(int fd, bool only_dirs, bool honour_sticky, struct stat *root_dev) {