diff options
author | Darrick J. Wong <darrick.wong@oracle.com> | 2020-11-10 16:44:56 -0800 |
---|---|---|
committer | Eryu Guan <guaneryu@gmail.com> | 2020-11-15 14:52:52 +0800 |
commit | 0743230c36029be5f686e278cbd154ae263b44b6 (patch) | |
tree | a9681cf06b77c00157972a5b6da44befb5accaeb /ltp | |
parent | 808f39a416c9627cecaf9e155feb3ab8dcf21ac0 (diff) |
fsstress: remove attr_remove
attr_remove is deprecated, so replace it with lremovexattr.
Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Eryu Guan <guaneryu@gmail.com>
Diffstat (limited to 'ltp')
-rw-r--r-- | ltp/fsstress.c | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/ltp/fsstress.c b/ltp/fsstress.c index 12aa8fa9..22df5e38 100644 --- a/ltp/fsstress.c +++ b/ltp/fsstress.c @@ -394,7 +394,7 @@ struct print_string flag_str = {0}; void add_to_flist(int, int, int, int); void append_pathname(pathname_t *, char *); int attr_list_path(pathname_t *, char *, const int, int, attrlist_cursor_t *); -int attr_remove_path(pathname_t *, const char *, int); +int attr_remove_path(pathname_t *, const char *); int attr_set_path(pathname_t *, const char *, const char *, const int); void check_cwd(void); void cleanup_flist(void); @@ -889,18 +889,18 @@ attr_list_path(pathname_t *name, } int -attr_remove_path(pathname_t *name, const char *attrname, int flags) +attr_remove_path(pathname_t *name, const char *attrname) { char buf[NAME_MAX + 1]; pathname_t newname; int rval; - rval = attr_remove(name->path, attrname, flags); + rval = lremovexattr(name->path, attrname); if (rval >= 0 || errno != ENAMETOOLONG) return rval; separate_pathname(name, buf, &newname); if (chdir(buf) == 0) { - rval = attr_remove_path(&newname, attrname, flags); + rval = attr_remove_path(&newname, attrname); assert(chdir("..") == 0); } free_pathname(&newname); @@ -2362,7 +2362,10 @@ attr_remove_f(int opno, long r) free_pathname(&f); return; } - e = attr_remove_path(&f, aname, ATTR_DONTFOLLOW) < 0 ? errno : 0; + if (attr_remove_path(&f, aname) < 0) + e = errno; + else + e = 0; check_cwd(); if (v) printf("%d/%d: attr_remove %s %s %d\n", |