Displaying 4 results from an estimated 4 matches for "show_loop".
Did you mean:
sha1_loop
2019 Nov 05
0
[klibc:master] losetup: Delete fallbacks to LOOP_{GET, SET}_STATUS
...- /* error in case values were truncated */
- if (info->lo_device != info64->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_dev...
2019 Nov 05
0
[klibc:master] losetup: Fix char signedness mismatches with <linux/loop.h>
...n Hutchings <ben at decadent.org.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 @...
2011 Jul 05
0
[PATCH] losetup: use stdout and return 0 for -h
...sage();
+ usage(stderr);
} else if (find) {
if (argc < optind || argc > optind+1)
- usage();
+ usage(stderr);
} else {
if (argc < optind+1 || argc > optind+2)
- usage();
+ usage(stderr);
}
if (find) {
@@ -471,9 +476,9 @@ int main(int argc, char **argv)
res = show_loop(device);
else {
if (offset && sscanf(offset, "%llu", &off) != 1)
- usage();
+ usage(stderr);
if (passfd && sscanf(passfd, "%d", &pfd) != 1)
- usage();
+ usage(stderr);
res = set_loop(device, file, off, encryption, pfd, &ro);
}
r...
2010 Mar 14
0
[patches] klibc review unsorted patch queue
...+ /* error in case values were truncated */
+ if (info->lo_device != info64->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...