]> git.ipfire.org Git - thirdparty/util-linux.git/commitdiff
lib/loopdev: remove loopcxt_set_fd()
authorThomas Weißschuh <thomas.weissschuh@linutronix.de>
Tue, 15 Apr 2025 15:03:30 +0000 (17:03 +0200)
committerThomas Weißschuh <thomas.weissschuh@linutronix.de>
Wed, 16 Apr 2025 06:25:59 +0000 (08:25 +0200)
It is not used.

Signed-off-by: Thomas Weißschuh <thomas.weissschuh@linutronix.de>
include/loopdev.h
lib/loopdev.c

index e5ec1c98a467a63c3a869b0c02f7618dc6433a68..ec57a8c2f7185e2fa2ea1c7f11933b68ae677f61 100644 (file)
@@ -179,7 +179,6 @@ extern const char *loopcxt_get_device(struct loopdev_cxt *lc);
 extern struct loop_info64 *loopcxt_get_info(struct loopdev_cxt *lc);
 
 extern int loopcxt_get_fd(struct loopdev_cxt *lc);
-extern int loopcxt_set_fd(struct loopdev_cxt *lc, int fd, mode_t mode);
 
 extern int loopcxt_init_iterator(struct loopdev_cxt *lc, int flags);
 extern int loopcxt_deinit_iterator(struct loopdev_cxt *lc);
index 699322c4a748ad17a710cf25d6b24764905d30b9..11bbc1869a01c312421cae71cfde82dd387fb0e6 100644 (file)
@@ -346,16 +346,6 @@ int loopcxt_get_fd(struct loopdev_cxt *lc)
        return __loopcxt_get_fd(lc, O_RDONLY);
 }
 
-int loopcxt_set_fd(struct loopdev_cxt *lc, int fd, mode_t mode)
-{
-       if (!lc)
-               return -EINVAL;
-
-       lc->fd = fd;
-       lc->mode = mode;
-       return 0;
-}
-
 /*
  * @lc: context
  * @flags: LOOPITER_FL_* flags