Displaying 3 results from an estimated 3 matches for "loopinfo64".
2019 Nov 05
0
[klibc:master] losetup: Fix char signedness mismatches with <linux/loop.h>
...rg.uk>
---
usr/utils/losetup.c | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/usr/utils/losetup.c b/usr/utils/losetup.c
index ebc6f360..1f50a001 100644
--- a/usr/utils/losetup.c
+++ b/usr/utils/losetup.c
@@ -94,7 +94,7 @@ static int show_loop(char *device)
if (loopinfo64.lo_encrypt_type ||
loopinfo64.lo_crypt_name[0]) {
- char *e = loopinfo64.lo_crypt_name;
+ const char *e = (const char *)loopinfo64.lo_crypt_name;
if (*e == 0 && loopinfo64.lo_encrypt_type == 1)
e = "XOR";
@@ -258,14 +258,14 @@ int set_loop(const char *device,...
2010 Mar 14
0
[patches] klibc review unsorted patch queue
...64->lo_device ||
+ info->lo_rdevice != info64->lo_rdevice ||
+ info->lo_inode != info64->lo_inode ||
+ info->lo_offset != info64->lo_offset)
+ return -EOVERFLOW;
+
+ return 0;
+}
+
+
+static int show_loop(char *device)
+{
+ struct loop_info loopinfo;
+ struct loop_info64 loopinfo64;
+ int fd, errsv;
+
+ if ((fd = open(device, O_RDONLY)) < 0) {
+ int errsv = errno;
+ fprintf(stderr, "loop: can't open device %s: %s\n",
+ device, strerror (errsv));
+ return 2;
+ }
+
+ if (ioctl(fd, LOOP_GET_STATUS64, &loopinfo64) == 0) {
+
+ loopinfo64.lo_file_name[LO_...
2019 Nov 05
0
[klibc:master] losetup: Delete fallbacks to LOOP_{GET, SET}_STATUS
...64->lo_device ||
- info->lo_rdevice != info64->lo_rdevice ||
- info->lo_inode != info64->lo_inode ||
- info->lo_offset != info64->lo_offset)
- return -EOVERFLOW;
-
- return 0;
-}
-
-
static int show_loop(char *device)
{
- struct loop_info loopinfo;
struct loop_info64 loopinfo64;
int fd, errsv;
@@ -106,23 +75,6 @@ static int show_loop(char *device)
return 0;
}
- if (ioctl(fd, LOOP_GET_STATUS, &loopinfo) == 0) {
- printf ("%s: [%04x]:%ld (%s)",
- device, loopinfo.lo_device, loopinfo.lo_inode,
- loopinfo.lo_name);
-
- if (loopinfo.lo_offset)
-...