pit

Owner: IIIlllIIIllI URL: git@github.com:nyangkosense/pit.git

clean up

Commit 9ddb8cc4c429b4145d2b22ac1dc6d42579343293 by IIIlllIIIllI <seb.michalk@gmail.com> on 2024-12-09 10:28:40 +0100
diff --git a/pit.c b/pit.c
index 7458d44..fdcec7f 100644
--- a/pit.c
+++ b/pit.c
@@ -941,8 +941,6 @@ find_mounted_pits(char ***paths, int *count)
 }
 
 static int
-<<<<<<< HEAD
-=======
 close_mapper_device(const char *name)
 {
     struct crypt_device *cd;
@@ -969,7 +967,6 @@ close_mapper_device(const char *name)
 
 /* panic_close forcefully, without any save attempt, closes the mounts by pit */
 static int
->>>>>>> a40f1006efc4863ac6de4ea078da904371fb5b63
 panic_close(void)
 {
     DIR *dir;
@@ -980,7 +977,6 @@ panic_close(void)
         return run_privileged("%s panic", program_name);
     }
 
-<<<<<<< HEAD
     if (find_mounted_pits(&mounted, &count) == 0 && count > 0) {
         printf("pit: force closing %d containers...\n", count);
         
@@ -1009,7 +1005,6 @@ panic_close(void)
                 }
                 closedir(proc_dir);
                 usleep(100000);
-=======
     /* first kill everything in /proc that touches the mounts */
     DIR *proc_dir = opendir("/proc");
     if (proc_dir) {
@@ -1018,7 +1013,6 @@ panic_close(void)
             if (isdigit(pid_dir->d_name[0])) {
                 /* just kill every process that might touch the paths */
                 kill(atoi(pid_dir->d_name), SIGKILL);
->>>>>>> a40f1006efc4863ac6de4ea078da904371fb5b63
             }
 
             printf("pit: force unmounting %s\n", mounted[i]);
@@ -1043,16 +1037,13 @@ panic_close(void)
 
     while ((dp = readdir(dir)) != NULL) {
         if (strncmp(dp->d_name, MAPPER_PREFIX, strlen(MAPPER_PREFIX)) == 0) {
-<<<<<<< HEAD
             printf("pit: force closing device %s\n", dp->d_name);
             struct crypt_device *cd;
             if (crypt_init_by_name(&cd, dp->d_name) == 0) {
-=======
             printf("pit: force closing %s\n", dp->d_name);
             struct crypt_device *cd;
             if (crypt_init_by_name(&cd, dp->d_name) == 0) {
                 /* force close even if device is busy */
->>>>>>> a40f1006efc4863ac6de4ea078da904371fb5b63
                 crypt_deactivate_by_name(cd, dp->d_name, CRYPT_DEACTIVATE_FORCE);
                 crypt_free(cd);
             }