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:
Christopher Haster
2025-11-09 01:02:18 -06:00
parent 4010afeafd
commit e196be53df
5 changed files with 47 additions and 47 deletions
+1 -1
View File
@@ -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;