wok view busybox/stuff/busybox-1.31-losetup.u @ rev 22042

gcc83-lib-base: do NOT provide gcc-lib-base
Currently BOTH gcc-lib-base and gcc83-lib-base are installed on my SliTaz system. So, with the current (and longstanding) tazpkg limitations I can't update just gcc-lib-base: tazpkg always updates gcc83-lib-base for me instead. Now I can't run Firefox, Vivaldi, Chrome, etc. I think because of gcc-lib-base, but I not sure 1bsolutely.
author Aleksej Bobylev <al.bobylev@gmail.com>
date Tue Oct 22 12:55:54 2019 +0300 (2019-10-22)
parents
children
line source
1 keep previous default behaviour and display cloop devices
2 --- busybox-1.31/util-linux/losetup.c
3 +++ busybox-1.31/util-linux/losetup.c
4 @@ -96,17 +96,21 @@
5 }
7 /* -a */
8 - if (opt == OPT_a) {
9 - int n;
10 + if (opt == OPT_a || (!opt && !argv[0])) {
11 + int i, n;
12 + static const char *fmt[3] = { LOOP_FORMAT, "/dev/cloop", "/dev/cloop%u" };
13 +
14 + for (i = 0; i < 3; i++)
15 for (n = 0; n < MAX_LOOP_NUM; n++) {
16 char *s;
18 - sprintf(dev, LOOP_FORMAT, n);
19 + sprintf(dev, fmt[i], n);
20 s = query_loop(dev);
21 if (s) {
22 printf("%s: %s\n", dev, s);
23 free(s);
24 }
25 + if (i == 1) break; /* /dev/cloop */
26 }
27 return EXIT_SUCCESS;
28 }