]> git.ipfire.org Git - thirdparty/plymouth.git/commitdiff
utils: drop ply_list_directory
authorRay Strode <rstrode@redhat.com>
Wed, 12 Oct 2011 02:09:37 +0000 (22:09 -0400)
committerRay Strode <rstrode@redhat.com>
Wed, 12 Oct 2011 02:09:37 +0000 (22:09 -0400)
It's unused code

src/libply/ply-utils.c
src/libply/ply-utils.h

index 6aa76f03fcf314951deb2e6af4e51601a9d6787b..60d59d16e17457b5c6cd0da04adc084e3fab0bcd 100644 (file)
@@ -658,44 +658,6 @@ ply_character_device_exists (const char *device)
   return S_ISCHR (file_info.st_mode);
 }
 
-void 
-ply_list_directory (const char *path)
-{
-  DIR *dir;
-  struct dirent *entry;
-  static int level = 0;
-
-  dir = opendir (path);
-
-  if (dir == NULL)
-    return;
-
-  if (level > 5)
-    return;
-
-  int index = 0;
-  while ((entry = readdir (dir)) != NULL) 
-    {
-      char *subdir;
-
-      index++;
-
-      if (index > 10)
-        break;
-
-      subdir = NULL;
-      asprintf (&subdir, "%s/%s", path, entry->d_name);
-      ply_error ("%s ", subdir);
-      level++;
-      if (entry->d_name[0] != '.')
-        ply_list_directory (subdir);
-      level--;
-      free (subdir);
-    }
-
-  closedir (dir);
-}
-
 ply_module_handle_t *
 ply_open_module (const char *module_path)
 {
index cae2891ac32d793b07fc71bfb66576806369408d..5ca327d187c814fbafd89e150ca33caaa7ec6e30 100644 (file)
@@ -94,7 +94,6 @@ void ply_restore_errno (void);
 bool ply_directory_exists (const char *dir);
 bool ply_file_exists (const char *file);
 bool ply_character_device_exists (const char *device);
-void ply_list_directory (const char *dir);
 
 ply_module_handle_t *ply_open_module (const char *module_path);
 ply_module_handle_t *ply_open_built_in_module (void);