Skip to content

Commit 13f8333

Browse files
committed
Make it more clear what the override argument does
Ticket: ENT-10961, CFE-1840 Signed-off-by: Lars Erik Wik <[email protected]>
1 parent 863052e commit 13f8333

File tree

1 file changed

+9
-9
lines changed

1 file changed

+9
-9
lines changed

libpromises/override_fsattrs.h

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -36,8 +36,8 @@
3636
* @param orig The original file (may be immutable)
3737
* @param copy Updated to contain the filename of the mutable copy
3838
* @param copy_len The size of the buffer to store the filename of the copy
39-
* @param override Whether to actually do override (original filename is
40-
* copied to copy buffer if false)
39+
* @param override Whether to actually do override (i.e. temporarily clear it).
40+
* The original filename is copied to copy-buffer if false
4141
* @return false in case of failure
4242
*/
4343
bool OverrideImmutableBegin(
@@ -48,7 +48,7 @@ bool OverrideImmutableBegin(
4848
* replaces it with the mutated copy
4949
* @param orig The original file (may be immutable)
5050
* @param copy The mutated copy to replace the original
51-
* @param override Whether to actually do override
51+
* @param override Whether to actually do override (i.e. temporarily clear it)
5252
* @param abort Whether to abort the override
5353
* @return false in case of failure
5454
* @note The immutable bit is reset to it's original state
@@ -60,7 +60,7 @@ bool OverrideImmutableCommit(
6060
* @brief Change mode on an immutable file
6161
* @param filename Name of the file
6262
* @param mode The file mode
63-
* @param override Whether to actually do override
63+
* @param override Whether to actually do override (i.e. temporarily clear it)
6464
* @return false in case of failure
6565
* @note It uses safe_chmod() under the hood
6666
*/
@@ -71,7 +71,7 @@ bool OverrideImmutableChmod(const char *filename, mode_t mode, bool override);
7171
* new to the old
7272
* @param old_filename Filename of the old file
7373
* @param new_filename Filename of the new file
74-
* @param override Whether to actually do override
74+
* @param override Whether to actually do override (i.e. temporarily clear it)
7575
* @return false in case of failure
7676
*/
7777
bool OverrideImmutableRename(
@@ -80,7 +80,7 @@ bool OverrideImmutableRename(
8080
/**
8181
* @brief Delete immutable file
8282
* @param filename Name of the file to delete
83-
* @param override Whether to actually do override
83+
* @param override Whether to actually do override (i.e. temporarily clear it)
8484
* @return false in case of failure
8585
*/
8686
bool OverrideImmutableDelete(const char *filename, bool override);
@@ -89,7 +89,7 @@ bool OverrideImmutableDelete(const char *filename, bool override);
8989
* @brief Temporarily clears the immutable bit and changes access and
9090
* modification times of the inode
9191
* @param filename Name of the file to touch
92-
* @param override Whether to actually do override
92+
* @param override Whether to actually do override (i.e. temporarily clear it)
9393
* @param times Modification times (can be NULL)
9494
* @return false in case of failure
9595
*/
@@ -99,7 +99,7 @@ bool OverrideImmutableUtime(
9999
/**
100100
* @brief Temporarily clears the immutable bit (best effort / no guarantees)
101101
* @param filename Name of the file to clear the immutable bit on
102-
* @param override Whether to actually do override
102+
* @param override Whether to actually do override (i.e. temporarily clear it)
103103
* @param is_immutable Whether or not the file actually was immutable
104104
* @return Result of clearing the immutable bit (no to be interpreted by the
105105
* caller)
@@ -110,7 +110,7 @@ FSAttrsResult TemporarilyClearImmutableBit(
110110
/**
111111
* @brief Reset temporarily cleared immutable bit
112112
* @param filename Name of the file to clear the immutable bit on
113-
* @param override Whether to actually do override
113+
* @param override Whether to actually do override (i.e. temporarily clear it)
114114
* @param res The result from previously clearing it
115115
* @param is_immutable Whether or not the file actually was immutable
116116
*/

0 commit comments

Comments
 (0)