summaryrefslogtreecommitdiff
path: root/src/shared/rm-rf.h
Commit message (Collapse)AuthorAgeFilesLines
* Revert "rm-rf: Add rm_rf_physical_and_close()"Daan De Meyer2022-11-111-17/+0
| | | | | | | This reverts commit 56e2bceddc7383c4abe1ef0110192e491c729de4. Doing destructive cleanup operations via unreliable /proc path lookups is unsafe and should be avoided so let's remove this function.
* rm-rf: Add rm_rf_physical_and_close()Daan De Meyer2022-11-091-0/+17
| | | | | | | In tests it's useful to be able to delete temporary directories via a file descriptor to them, so let's add rm_rf_physical_and_close() which gets the file descriptor path via /proc and tries to remove it that way.
* rm-rf: optionally fsync() after removing directory treeLennart Poettering2021-10-111-0/+1
|
* rm-rf: refactor rm_rf_children(), split out body of directory iteration loopLennart Poettering2021-07-301-1/+2
| | | | | | This splits out rm_rf_children_inner() as body of the loop. We can use that to implement rm_rf_child() for deleting one specific entry in a directory.
* basic,shared: move a bunch of files to src/shared/Zbigniew Jędrzejewski-Szmek2021-06-241-0/+51
| | | | | | | | | | | | The goal is to move everything that requires selinux or smack away from src/basic/. This means that src/basic/label.[ch] must move, which implies btrfs-util.[ch], copy.[ch], and a bunch of other files which form a cluster of internal use. This is just moving text around, so there should be no functional difference. test-blockdev-util is new, because path_is_encrypted() is moved to blockdev-util.c, and so far we didn't have any tests for code there.
* build-sys: split internal basic/ library from shared/Kay Sievers2015-06-111-34/+0
| | | | | | | | | | basic/ can be used by everything cannot use anything outside of basic/ libsystemd/ can use basic/ cannot use shared/ shared/ can use libsystemd/
* rm-rf: add support for recursively removing btrfs subvolumesLennart Poettering2015-04-061-0/+1
|
* util: rework rm_rf() logicLennart Poettering2015-04-061-0/+33
- Move to its own file rm-rf.c - Change parameters into a single flags parameter - Remove "honour sticky" logic, it's unused these days