diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-06-17 10:52:33 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-06-17 10:52:33 +0000 |
commit | 2c3307fb903f427be3d021c5780b75cac9af2ce8 (patch) | |
tree | 65cf431f40b7481d81ae2dfce9576342686448f7 /templates/man2/open_by_handle_at.2.pot | |
parent | Releasing progress-linux version 4.22.0-1~progress7.99u1. (diff) | |
download | manpages-l10n-2c3307fb903f427be3d021c5780b75cac9af2ce8.tar.xz manpages-l10n-2c3307fb903f427be3d021c5780b75cac9af2ce8.zip |
Merging upstream version 4.23.0.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'templates/man2/open_by_handle_at.2.pot')
-rw-r--r-- | templates/man2/open_by_handle_at.2.pot | 196 |
1 files changed, 176 insertions, 20 deletions
diff --git a/templates/man2/open_by_handle_at.2.pot b/templates/man2/open_by_handle_at.2.pot index e9713a70..59a4adbb 100644 --- a/templates/man2/open_by_handle_at.2.pot +++ b/templates/man2/open_by_handle_at.2.pot @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" -"POT-Creation-Date: 2024-03-01 17:03+0100\n" +"POT-Creation-Date: 2024-06-01 06:07+0200\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" "Language-Team: LANGUAGE <LL@li.org>\n" @@ -24,15 +24,15 @@ msgid "open_by_handle_at" msgstr "" #. type: TH -#: archlinux fedora-40 fedora-rawhide mageia-cauldron +#: archlinux debian-unstable opensuse-tumbleweed #, no-wrap -msgid "2023-10-31" +msgid "2024-05-02" msgstr "" #. type: TH -#: archlinux fedora-40 fedora-rawhide mageia-cauldron +#: archlinux debian-unstable #, no-wrap -msgid "Linux man-pages 6.06" +msgid "Linux man-pages 6.8" msgstr "" #. type: SH @@ -170,7 +170,8 @@ msgid "" msgstr "" #. type: Plain text -#: archlinux fedora-40 fedora-rawhide mageia-cauldron +#: archlinux debian-unstable fedora-40 fedora-rawhide mageia-cauldron +#: opensuse-tumbleweed msgid "" "Other than the use of the I<handle_bytes> field, the caller should treat the " "I<file_handle> structure as an opaque data type: the I<handle_type> and " @@ -183,7 +184,8 @@ msgid "" msgstr "" #. type: Plain text -#: archlinux fedora-40 fedora-rawhide mageia-cauldron +#: archlinux debian-unstable fedora-40 fedora-rawhide mageia-cauldron +#: opensuse-tumbleweed msgid "" "The I<flags> argument is a bit mask constructed by ORing together zero or " "more of B<AT_HANDLE_FID>, B<AT_EMPTY_PATH>, and B<AT_SYMLINK_FOLLOW>, " @@ -192,7 +194,8 @@ msgstr "" #. commit 96b2b072ee62be8ae68c8ecf14854c4d0505a8f8 #. type: Plain text -#: archlinux fedora-40 fedora-rawhide mageia-cauldron +#: archlinux debian-unstable fedora-40 fedora-rawhide mageia-cauldron +#: opensuse-tumbleweed msgid "" "When I<flags> contain the B<AT_HANDLE_FID> (since Linux 6.5) flag, the " "caller indicates that the returned I<file_handle> is needed to identify the " @@ -554,7 +557,8 @@ msgid "B<ESTALE>" msgstr "" #. type: Plain text -#: archlinux fedora-40 fedora-rawhide mageia-cauldron +#: archlinux debian-unstable fedora-40 fedora-rawhide mageia-cauldron +#: opensuse-tumbleweed msgid "" "The specified I<handle> is not valid for opening a file. This error will " "occur if, for example, the file has been deleted. This error can also occur " @@ -619,7 +623,8 @@ msgid "" msgstr "" #. type: Plain text -#: archlinux fedora-40 fedora-rawhide mageia-cauldron +#: archlinux debian-unstable fedora-40 fedora-rawhide mageia-cauldron +#: opensuse-tumbleweed msgid "" "Some filesystem don't support the translation of pathnames to file handles, " "for example, I</proc>, I</sys>, and various network filesystems. Some " @@ -865,8 +870,7 @@ msgid "Program source: t_open_by_handle_at.c" msgstr "" #. type: Plain text -#: archlinux debian-unstable fedora-40 fedora-rawhide mageia-cauldron -#: opensuse-tumbleweed +#: archlinux debian-unstable opensuse-tumbleweed #, no-wrap msgid "" "#define _GNU_SOURCE\n" @@ -876,6 +880,7 @@ msgid "" "#include E<lt>stdio.hE<gt>\n" "#include E<lt>stdlib.hE<gt>\n" "#include E<lt>string.hE<gt>\n" +"#include E<lt>sys/types.hE<gt>\n" "#include E<lt>unistd.hE<gt>\n" "\\&\n" "/* Scan /proc/self/mountinfo to find the line whose mount ID matches\n" @@ -1039,7 +1044,7 @@ msgid "Linux man-pages 6.03" msgstr "" #. type: Plain text -#: debian-bookworm debian-unstable opensuse-leap-15-6 opensuse-tumbleweed +#: debian-bookworm opensuse-leap-15-6 msgid "" "Other than the use of the I<handle_bytes> field, the caller should treat the " "I<file_handle> structure as an opaque data type: the I<handle_type> and " @@ -1048,14 +1053,14 @@ msgid "" msgstr "" #. type: Plain text -#: debian-bookworm debian-unstable opensuse-leap-15-6 opensuse-tumbleweed +#: debian-bookworm opensuse-leap-15-6 msgid "" "The I<flags> argument is a bit mask constructed by ORing together zero or " "more of B<AT_EMPTY_PATH> and B<AT_SYMLINK_FOLLOW>, described below." msgstr "" #. type: Plain text -#: debian-bookworm debian-unstable opensuse-leap-15-6 opensuse-tumbleweed +#: debian-bookworm opensuse-leap-15-6 msgid "" "The specified I<handle> is not valid. This error will occur if, for " "example, the file has been deleted." @@ -1074,7 +1079,7 @@ msgid "These system calls are nonstandard Linux extensions." msgstr "" #. type: Plain text -#: debian-bookworm debian-unstable opensuse-leap-15-6 opensuse-tumbleweed +#: debian-bookworm opensuse-leap-15-6 msgid "" "Some filesystem don't support the translation of pathnames to file handles, " "for example, I</proc>, I</sys>, and various network filesystems." @@ -1489,15 +1494,160 @@ msgid " printf(\"Read %zd bytes\\en\", nread);\n" msgstr "" #. type: TH -#: debian-unstable opensuse-tumbleweed +#: fedora-40 fedora-rawhide mageia-cauldron #, no-wrap -msgid "2023-05-03" +msgid "2023-10-31" msgstr "" #. type: TH -#: debian-unstable opensuse-tumbleweed +#: fedora-40 mageia-cauldron #, no-wrap -msgid "Linux man-pages 6.05.01" +msgid "Linux man-pages 6.06" +msgstr "" + +#. type: Plain text +#: fedora-40 fedora-rawhide mageia-cauldron +#, no-wrap +msgid "" +"#define _GNU_SOURCE\n" +"#include E<lt>err.hE<gt>\n" +"#include E<lt>fcntl.hE<gt>\n" +"#include E<lt>limits.hE<gt>\n" +"#include E<lt>stdio.hE<gt>\n" +"#include E<lt>stdlib.hE<gt>\n" +"#include E<lt>string.hE<gt>\n" +"#include E<lt>unistd.hE<gt>\n" +"\\&\n" +"/* Scan /proc/self/mountinfo to find the line whose mount ID matches\n" +" \\[aq]mount_id\\[aq]. (An easier way to do this is to install and use the\n" +" \\[aq]libmount\\[aq] library provided by the \\[aq]util-linux\\[aq] project.)\n" +" Open the corresponding mount path and return the resulting file\n" +" descriptor. */\n" +"\\&\n" +"static int\n" +"open_mount_path_by_id(int mount_id)\n" +"{\n" +" int mi_mount_id, found;\n" +" char mount_path[PATH_MAX];\n" +" char *linep;\n" +" FILE *fp;\n" +" size_t lsize;\n" +" ssize_t nread;\n" +"\\&\n" +" fp = fopen(\"/proc/self/mountinfo\", \"r\");\n" +" if (fp == NULL)\n" +" err(EXIT_FAILURE, \"fopen\");\n" +"\\&\n" +" found = 0;\n" +" linep = NULL;\n" +" while (!found) {\n" +" nread = getline(&linep, &lsize, fp);\n" +" if (nread == -1)\n" +" break;\n" +"\\&\n" +" nread = sscanf(linep, \"%d %*d %*s %*s %s\",\n" +" &mi_mount_id, mount_path);\n" +" if (nread != 2) {\n" +" fprintf(stderr, \"Bad sscanf()\\en\");\n" +" exit(EXIT_FAILURE);\n" +" }\n" +"\\&\n" +" if (mi_mount_id == mount_id)\n" +" found = 1;\n" +" }\n" +" free(linep);\n" +"\\&\n" +" fclose(fp);\n" +"\\&\n" +" if (!found) {\n" +" fprintf(stderr, \"Could not find mount point\\en\");\n" +" exit(EXIT_FAILURE);\n" +" }\n" +"\\&\n" +" return open(mount_path, O_RDONLY);\n" +"}\n" +"\\&\n" +"int\n" +"main(int argc, char *argv[])\n" +"{\n" +" int mount_id, fd, mount_fd, handle_bytes;\n" +" char buf[1000];\n" +"#define LINE_SIZE 100\n" +" char line1[LINE_SIZE], line2[LINE_SIZE];\n" +" char *nextp;\n" +" ssize_t nread;\n" +" struct file_handle *fhp;\n" +"\\&\n" +" if ((argc E<gt> 1 && strcmp(argv[1], \"--help\") == 0) || argc E<gt> 2) {\n" +" fprintf(stderr, \"Usage: %s [mount-path]\\en\", argv[0]);\n" +" exit(EXIT_FAILURE);\n" +" }\n" +"\\&\n" +" /* Standard input contains mount ID and file handle information:\n" +"\\&\n" +" Line 1: E<lt>mount_idE<gt>\n" +" Line 2: E<lt>handle_bytesE<gt> E<lt>handle_typeE<gt> E<lt>bytes of handle in hexE<gt>\n" +" */\n" +"\\&\n" +" if (fgets(line1, sizeof(line1), stdin) == NULL ||\n" +" fgets(line2, sizeof(line2), stdin) == NULL)\n" +" {\n" +" fprintf(stderr, \"Missing mount_id / file handle\\en\");\n" +" exit(EXIT_FAILURE);\n" +" }\n" +"\\&\n" +" mount_id = atoi(line1);\n" +"\\&\n" +" handle_bytes = strtoul(line2, &nextp, 0);\n" +"\\&\n" +" /* Given handle_bytes, we can now allocate file_handle structure. */\n" +"\\&\n" +" fhp = malloc(sizeof(*fhp) + handle_bytes);\n" +" if (fhp == NULL)\n" +" err(EXIT_FAILURE, \"malloc\");\n" +"\\&\n" +" fhp-E<gt>handle_bytes = handle_bytes;\n" +"\\&\n" +" fhp-E<gt>handle_type = strtoul(nextp, &nextp, 0);\n" +"\\&\n" +" for (size_t j = 0; j E<lt> fhp-E<gt>handle_bytes; j++)\n" +" fhp-E<gt>f_handle[j] = strtoul(nextp, &nextp, 16);\n" +"\\&\n" +" /* Obtain file descriptor for mount point, either by opening\n" +" the pathname specified on the command line, or by scanning\n" +" /proc/self/mounts to find a mount that matches the \\[aq]mount_id\\[aq]\n" +" that we received from stdin. */\n" +"\\&\n" +" if (argc E<gt> 1)\n" +" mount_fd = open(argv[1], O_RDONLY);\n" +" else\n" +" mount_fd = open_mount_path_by_id(mount_id);\n" +"\\&\n" +" if (mount_fd == -1)\n" +" err(EXIT_FAILURE, \"opening mount fd\");\n" +"\\&\n" +" /* Open file using handle and mount point. */\n" +"\\&\n" +" fd = open_by_handle_at(mount_fd, fhp, O_RDONLY);\n" +" if (fd == -1)\n" +" err(EXIT_FAILURE, \"open_by_handle_at\");\n" +"\\&\n" +" /* Try reading a few bytes from the file. */\n" +"\\&\n" +" nread = read(fd, buf, sizeof(buf));\n" +" if (nread == -1)\n" +" err(EXIT_FAILURE, \"read\");\n" +"\\&\n" +" printf(\"Read %zd bytes\\en\", nread);\n" +"\\&\n" +" exit(EXIT_SUCCESS);\n" +"}\n" +msgstr "" + +#. type: TH +#: fedora-rawhide +#, no-wrap +msgid "Linux man-pages 6.7" msgstr "" #. type: TH @@ -1511,3 +1661,9 @@ msgstr "" #, no-wrap msgid "Linux man-pages 6.04" msgstr "" + +#. type: TH +#: opensuse-tumbleweed +#, no-wrap +msgid "Linux man-pages (unreleased)" +msgstr "" |