]> git.ipfire.org Git - thirdparty/man-pages.git/blobdiff - man2/open_by_handle_at.2
Ready for 5.00
[thirdparty/man-pages.git] / man2 / open_by_handle_at.2
index c4d7ba53aa38681f52a54752450ee9776034bcff..795db795a6c24935115e476449c22d57b9fdff5d 100644 (file)
@@ -22,7 +22,7 @@
 .\" the source, must acknowledge the copyright and authors of this work.
 .\" %%%LICENSE_END
 .\"
-.TH OPEN_BY_HANDLE_AT 2 2017-09-15 "Linux" "Linux Programmer's Manual"
+.TH OPEN_BY_HANDLE_AT 2 2019-03-06 "Linux" "Linux Programmer's Manual"
 .SH NAME
 name_to_handle_at, open_by_handle_at \- obtain handle
 for a pathname and open file via a handle
@@ -223,7 +223,7 @@ is dereferenced if it is a symbolic link
 (so that the call returns a handle for the file referred to by the link).
 .PP
 .BR name_to_handle_at ()
-does not trigger a mount when the final component of the path is an
+does not trigger a mount when the final component of the pathname is an
 automount point.
 When a filesystem supports both file handles and
 automount points, a
@@ -237,7 +237,7 @@ This can happen since Linux 4.13
 with NFS when accessing a directory
 which is on a separate filesystem on the server.
 In this case, the automount can be triggered by adding a "/" to the end
-of the path.
+of the pathname.
 .SS open_by_handle_at()
 The
 .BR open_by_handle_at ()
@@ -525,11 +525,11 @@ no longer exists.
 .PP
 .in +4n
 .EX
-$ \fBstat \-\-printf="%i\\n" cecilia.txt\fP     # Display inode number
+$ \fBstat \-\-printf="%i\en" cecilia.txt\fP     # Display inode number
 4072121
 $ \fBrm cecilia.txt\fP
 $ \fBecho 'Can you please think about it?' > cecilia.txt\fP
-$ \fBstat \-\-printf="%i\\n" cecilia.txt\fP     # Check inode number
+$ \fBstat \-\-printf="%i\en" cecilia.txt\fP     # Check inode number
 4072121
 $ \fBsudo ./t_open_by_handle_at < fh\fP
 open_by_handle_at: Stale NFS file handle
@@ -548,7 +548,7 @@ open_by_handle_at: Stale NFS file handle
 #include <errno.h>
 #include <string.h>
 
-#define errExit(msg)    do { perror(msg); exit(EXIT_FAILURE); \\
+#define errExit(msg)    do { perror(msg); exit(EXIT_FAILURE); \e
                         } while (0)
 
 int
@@ -559,7 +559,7 @@ main(int argc, char *argv[])
     char *pathname;
 
     if (argc != 2) {
-        fprintf(stderr, "Usage: %s pathname\\n", argv[0]);
+        fprintf(stderr, "Usage: %s pathname\en", argv[0]);
         exit(EXIT_FAILURE);
     }
 
@@ -580,7 +580,7 @@ main(int argc, char *argv[])
     fhp\->handle_bytes = 0;
     if (name_to_handle_at(dirfd, pathname, fhp,
                 &mount_id, flags) != \-1 || errno != EOVERFLOW) {
-        fprintf(stderr, "Unexpected result from name_to_handle_at()\\n");
+        fprintf(stderr, "Unexpected result from name_to_handle_at()\en");
         exit(EXIT_FAILURE);
     }
 
@@ -599,11 +599,11 @@ main(int argc, char *argv[])
     /* Write mount ID, file handle size, and file handle to stdout,
        for later reuse by t_open_by_handle_at.c */
 
-    printf("%d\\n", mount_id);
+    printf("%d\en", mount_id);
     printf("%d %d   ", fhp\->handle_bytes, fhp\->handle_type);
     for (j = 0; j < fhp\->handle_bytes; j++)
         printf(" %02x", fhp\->f_handle[j]);
-    printf("\\n");
+    printf("\en");
 
     exit(EXIT_SUCCESS);
 }
@@ -621,7 +621,7 @@ main(int argc, char *argv[])
 #include <unistd.h>
 #include <string.h>
 
-#define errExit(msg)    do { perror(msg); exit(EXIT_FAILURE); \\
+#define errExit(msg)    do { perror(msg); exit(EXIT_FAILURE); \e
                         } while (0)
 
 /* Scan /proc/self/mountinfo to find the line whose mount ID matches
@@ -654,7 +654,7 @@ open_mount_path_by_id(int mount_id)
         nread = sscanf(linep, "%d %*d %*s %*s %s",
                        &mi_mount_id, mount_path);
         if (nread != 2) {
-            fprintf(stderr, "Bad sscanf()\\n");
+            fprintf(stderr, "Bad sscanf()\en");
             exit(EXIT_FAILURE);
         }
 
@@ -666,7 +666,7 @@ open_mount_path_by_id(int mount_id)
     fclose(fp);
 
     if (!found) {
-        fprintf(stderr, "Could not find mount point\\n");
+        fprintf(stderr, "Could not find mount point\en");
         exit(EXIT_FAILURE);
     }
 
@@ -685,7 +685,7 @@ main(int argc, char *argv[])
     char *nextp;
 
     if ((argc > 1 && strcmp(argv[1], "\-\-help") == 0) || argc > 2) {
-        fprintf(stderr, "Usage: %s [mount\-path]\\n", argv[0]);
+        fprintf(stderr, "Usage: %s [mount\-path]\en", argv[0]);
         exit(EXIT_FAILURE);
     }
 
@@ -697,7 +697,7 @@ main(int argc, char *argv[])
 
     if ((fgets(line1, sizeof(line1), stdin) == NULL) ||
            (fgets(line2, sizeof(line2), stdin) == NULL)) {
-        fprintf(stderr, "Missing mount_id / file handle\\n");
+        fprintf(stderr, "Missing mount_id / file handle\en");
         exit(EXIT_FAILURE);
     }
 
@@ -743,7 +743,7 @@ main(int argc, char *argv[])
     if (nread == \-1)
         errExit("read");
 
-    printf("Read %zd bytes\\n", nread);
+    printf("Read %zd bytes\en", nread);
 
     exit(EXIT_SUCCESS);
 }