diff options
| author | kraai <kraai@69ca8d6d-28ef-0310-b511-8ec308f3f277> | 2001-05-17 04:03:22 +0000 |
|---|---|---|
| committer | kraai <kraai@69ca8d6d-28ef-0310-b511-8ec308f3f277> | 2001-05-17 04:03:22 +0000 |
| commit | e06aca45058287e75ea0698931aa8ff0b0d3fd06 (patch) | |
| tree | 1ea083372c7b7ec8faba17e2cf57a6d86e9ae4f2 | |
| parent | dee05b159b4f447f9deb10ae6a3bd35a084cd581 (diff) | |
| download | busybox-w32-e06aca45058287e75ea0698931aa8ff0b0d3fd06.tar.gz busybox-w32-e06aca45058287e75ea0698931aa8ff0b0d3fd06.tar.bz2 busybox-w32-e06aca45058287e75ea0698931aa8ff0b0d3fd06.zip | |
Remove unused function. If necessary, we can use remove_file instead.
git-svn-id: svn://busybox.net/trunk/busybox@2666 69ca8d6d-28ef-0310-b511-8ec308f3f277
| -rw-r--r-- | archival/dpkg.c | 31 | ||||
| -rw-r--r-- | dpkg.c | 31 |
2 files changed, 0 insertions, 62 deletions
diff --git a/archival/dpkg.c b/archival/dpkg.c index 996809a6f..18742e8f6 100644 --- a/archival/dpkg.c +++ b/archival/dpkg.c | |||
| @@ -116,37 +116,6 @@ static int package_compare(const void *p1, const void *p2) | |||
| 116 | ((package_t *)p2)->package); | 116 | ((package_t *)p2)->package); |
| 117 | } | 117 | } |
| 118 | 118 | ||
| 119 | /* | ||
| 120 | * NOTE: this was handled by a "rm -rf" shell command | ||
| 121 | * Maybe theis behaviour should be integrated into the rm applet | ||
| 122 | * (i dont appreciate the rm applets recursive action fn)-bug1 | ||
| 123 | */ | ||
| 124 | static int remove_dir(const char *dirname) | ||
| 125 | { | ||
| 126 | struct dirent *fp; | ||
| 127 | DIR *dp = opendir(dirname); | ||
| 128 | while ((fp = readdir(dp)) != NULL) { | ||
| 129 | struct stat statbuf; | ||
| 130 | char *filename; | ||
| 131 | |||
| 132 | filename = (char *) xcalloc(1, strlen(dirname) + strlen(fp->d_name) + 2); | ||
| 133 | strcpy(filename, dirname); | ||
| 134 | strcat(filename, fp->d_name); | ||
| 135 | lstat(filename, &statbuf); | ||
| 136 | |||
| 137 | if ((strcmp(fp->d_name, ".") != 0) && (strcmp(fp->d_name, "..") != 0)) { | ||
| 138 | if (S_ISDIR(statbuf.st_mode)) { | ||
| 139 | remove_dir(strcat(filename, "/")); | ||
| 140 | } | ||
| 141 | else if (remove(filename) == -1) { | ||
| 142 | perror_msg(filename); | ||
| 143 | } | ||
| 144 | } | ||
| 145 | } | ||
| 146 | remove(dirname); | ||
| 147 | return EXIT_SUCCESS; | ||
| 148 | } | ||
| 149 | |||
| 150 | #ifdef DODEPENDS | 119 | #ifdef DODEPENDS |
| 151 | #include <ctype.h> | 120 | #include <ctype.h> |
| 152 | 121 | ||
| @@ -116,37 +116,6 @@ static int package_compare(const void *p1, const void *p2) | |||
| 116 | ((package_t *)p2)->package); | 116 | ((package_t *)p2)->package); |
| 117 | } | 117 | } |
| 118 | 118 | ||
| 119 | /* | ||
| 120 | * NOTE: this was handled by a "rm -rf" shell command | ||
| 121 | * Maybe theis behaviour should be integrated into the rm applet | ||
| 122 | * (i dont appreciate the rm applets recursive action fn)-bug1 | ||
| 123 | */ | ||
| 124 | static int remove_dir(const char *dirname) | ||
| 125 | { | ||
| 126 | struct dirent *fp; | ||
| 127 | DIR *dp = opendir(dirname); | ||
| 128 | while ((fp = readdir(dp)) != NULL) { | ||
| 129 | struct stat statbuf; | ||
| 130 | char *filename; | ||
| 131 | |||
| 132 | filename = (char *) xcalloc(1, strlen(dirname) + strlen(fp->d_name) + 2); | ||
| 133 | strcpy(filename, dirname); | ||
| 134 | strcat(filename, fp->d_name); | ||
| 135 | lstat(filename, &statbuf); | ||
| 136 | |||
| 137 | if ((strcmp(fp->d_name, ".") != 0) && (strcmp(fp->d_name, "..") != 0)) { | ||
| 138 | if (S_ISDIR(statbuf.st_mode)) { | ||
| 139 | remove_dir(strcat(filename, "/")); | ||
| 140 | } | ||
| 141 | else if (remove(filename) == -1) { | ||
| 142 | perror_msg(filename); | ||
| 143 | } | ||
| 144 | } | ||
| 145 | } | ||
| 146 | remove(dirname); | ||
| 147 | return EXIT_SUCCESS; | ||
| 148 | } | ||
| 149 | |||
| 150 | #ifdef DODEPENDS | 119 | #ifdef DODEPENDS |
| 151 | #include <ctype.h> | 120 | #include <ctype.h> |
| 152 | 121 | ||
