diff options
author | David Oberhollenzer <david.oberhollenzer@sigma-star.at> | 2016-08-25 13:38:20 +0200 |
---|---|---|
committer | David Oberhollenzer <david.oberhollenzer@sigma-star.at> | 2016-11-17 11:36:55 +0100 |
commit | 5841f15bf5d9cba2bdcc6526000538fedeee46e3 (patch) | |
tree | 5106f0234935cb69cb9b56f627225b28bf97cc78 | |
parent | adaff2f6964863dd0feb75dbf3c5278a58c970f6 (diff) |
Remove unused legacy_libmtd_open internal libmtd function
Signed-off-by: David Oberhollenzer <david.oberhollenzer@sigma-star.at>
Signed-off-by: Richard Weinberger <richard@nod.at>
-rw-r--r-- | lib/libmtd_int.h | 1 | ||||
-rw-r--r-- | lib/libmtd_legacy.c | 24 |
2 files changed, 0 insertions, 25 deletions
diff --git a/lib/libmtd_int.h b/lib/libmtd_int.h index 7913e67..8ff33ad 100644 --- a/lib/libmtd_int.h +++ b/lib/libmtd_int.h @@ -94,7 +94,6 @@ struct libmtd unsigned int offs64_ioctls:2; }; -int legacy_libmtd_open(void); int legacy_dev_present(int mtd_num); int legacy_mtd_get_info(struct mtd_info *info); int legacy_get_dev_info(const char *node, struct mtd_dev_info *mtd); diff --git a/lib/libmtd_legacy.c b/lib/libmtd_legacy.c index 233a92e..ba8eade 100644 --- a/lib/libmtd_legacy.c +++ b/lib/libmtd_legacy.c @@ -146,30 +146,6 @@ static int proc_parse_next(struct proc_parse_info *pi) } /** - * legacy_libmtd_open - legacy version of 'libmtd_open()'. - * - * This function is just checks that MTD is present in the system. Returns - * zero in case of success and %-1 in case of failure. In case of failure, - * errno contains zero if MTD is not present in the system, or contains the - * error code if a real error happened. This is similar to the 'libmtd_open()' - * return conventions. - */ -int legacy_libmtd_open(void) -{ - int fd; - - fd = open(MTD_PROC_FILE, O_RDONLY); - if (fd == -1) { - if (errno == ENOENT) - errno = 0; - return -1; - } - - close(fd); - return 0; -} - -/** * legacy_dev_presentl - legacy version of 'mtd_dev_present()'. * @info: the MTD device information is returned here * |