diff options
| author | Alejandro Colomar <alx@kernel.org> | 2023-05-03 00:48:14 +0200 |
|---|---|---|
| committer | Alejandro Colomar <alx@kernel.org> | 2023-05-03 00:48:22 +0200 |
| commit | fe5dba139dc089eae4061fdc17f087e71f48b198 (patch) | |
| tree | 54af56b1b0138bde9a21e99372ab68ce4d64564a /man4/loop.4 | |
| parent | 5a0d9ed151e6449d978fabdd654cacc17b20a235 (diff) | |
| download | man-pages-fe5dba139dc089eae4061fdc17f087e71f48b198.tar.gz | |
man*/, man.ignore.grep: srcfix; warn about blank lines
- Use the dummy character to avoid warnings in examples.
- Re-enable the warning.
Suggested-by: "G. Branden Robinson" <g.branden.robinson@gmail.com>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
Diffstat (limited to 'man4/loop.4')
| -rw-r--r-- | man4/loop.4 | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/man4/loop.4 b/man4/loop.4 index 5f923d1ba7..72a2431921 100644 --- a/man4/loop.4 +++ b/man4/loop.4 @@ -313,44 +313,44 @@ loopname = /dev/loop5 #include <stdio.h> #include <stdlib.h> #include <unistd.h> - +\& #define errExit(msg) do { perror(msg); exit(EXIT_FAILURE); \e } while (0) - +\& int main(int argc, char *argv[]) { int loopctlfd, loopfd, backingfile; long devnr; char loopname[4096]; - +\& if (argc != 2) { fprintf(stderr, "Usage: %s backing\-file\en", argv[0]); exit(EXIT_FAILURE); } - +\& loopctlfd = open("/dev/loop\-control", O_RDWR); if (loopctlfd == \-1) errExit("open: /dev/loop\-control"); - +\& devnr = ioctl(loopctlfd, LOOP_CTL_GET_FREE); if (devnr == \-1) errExit("ioctl\-LOOP_CTL_GET_FREE"); - +\& sprintf(loopname, "/dev/loop%ld", devnr); printf("loopname = %s\en", loopname); - +\& loopfd = open(loopname, O_RDWR); if (loopfd == \-1) errExit("open: loopname"); - +\& backingfile = open(argv[1], O_RDWR); if (backingfile == \-1) errExit("open: backing\-file"); - +\& if (ioctl(loopfd, LOOP_SET_FD, backingfile) == \-1) errExit("ioctl\-LOOP_SET_FD"); - +\& exit(EXIT_SUCCESS); } .EE |
