Adopted LFS3_ERR_BUSY for root-related errors
Now that we use LFS3_ERR_BUSY for traversals, we no longer have an excuse for not returning LFS3_ERR_BUSY on root-related errors: - lfs3_remove(&lfs3, "/") => LFS3_ERR_BUSY - lfs3_rename(&lfs3, "/", *) => LFS3_ERR_BUSY - lfs3_rename(&lfs3, *, "/") => LFS3_ERR_BUSY This better aligns with POSIX. Arguably we should have defined LFS3_ERR_BUSY for this case anyways, it's not like additional error codes cost much. No code changes.
This commit is contained in:
@@ -2447,7 +2447,7 @@ code = '''
|
||||
// well, because of the root really, but also because of the
|
||||
// stickynote
|
||||
//
|
||||
lfs3_rename(&lfs3, "batman", "/") => LFS3_ERR_INVAL;
|
||||
lfs3_rename(&lfs3, "batman", "/") => LFS3_ERR_BUSY;
|
||||
|
||||
// we should still be able to read our uncreat
|
||||
lfs3_file_rewind(&lfs3, &uncreat) => 0;
|
||||
|
||||
Reference in New Issue
Block a user