@@ -62,37 +62,6 @@ xstrdup (const char *s)
return t;
}
-int is_loop_device(const char *device)
-{
- struct stat statbuf;
- int loopmajor;
-#if 1
- loopmajor = 7;
-#else
- FILE *procdev;
- char line[100], *cp;
-
- loopmajor = 0;
-
- if ((procdev = fopen(PROC_DEVICES, "r")) != NULL) {
-
- while (fgets (line, sizeof(line), procdev)) {
-
- if ((cp = strstr (line, " loop\n")) != NULL) {
- *cp='\0';
- loopmajor=atoi(line);
- break;
- }
- }
-
- fclose(procdev);
- }
-#endif
- return (loopmajor && stat(device, &statbuf) == 0 &&
- S_ISBLK(statbuf.st_mode) &&
- major(statbuf.st_rdev) == loopmajor);
-}
-
#define SIZE(a) (sizeof(a)/sizeof(a[0]))
char *find_loop_by_file(const char *filename)
@@ -1,6 +1,5 @@
extern int verbose;
extern int set_loop (const char *, const char *, int, int *);
extern int del_loop (const char *);
-extern int is_loop_device (const char *);
extern char * find_unused_loop_device (void);
extern char * find_loop_by_file (const char *);
This function is not used any more. Signed-off-by: Martin Wilck <mwilck@suse.com> --- kpartx/lopart.c | 31 ------------------------------- kpartx/lopart.h | 1 - 2 files changed, 32 deletions(-)