| 1 |
# SOME DESCRIPTIVE TITLE |
| 2 |
# Copyright (C) YEAR Free Software Foundation, Inc. |
| 3 |
# This file is distributed under the same license as the PACKAGE package. |
| 4 |
# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR. |
| 5 |
# |
| 6 |
#, fuzzy |
| 7 |
msgid "" |
| 8 |
msgstr "" |
| 9 |
"Project-Id-Version: PACKAGE VERSION\n" |
| 10 |
"POT-Creation-Date: 2026-06-05 06:29+0200\n" |
| 11 |
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" |
| 12 |
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" |
| 13 |
"Language-Team: LANGUAGE <[email protected]>\n" |
| 14 |
"Language: \n" |
| 15 |
"MIME-Version: 1.0\n" |
| 16 |
"Content-Type: text/plain; charset=UTF-8\n" |
| 17 |
"Content-Transfer-Encoding: 8bit\n" |
| 18 |
|
| 19 |
#. type: TH |
| 20 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 21 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 22 |
#, no-wrap |
| 23 |
msgid "listxattr" |
| 24 |
msgstr "" |
| 25 |
|
| 26 |
#. type: TH |
| 27 |
#: archlinux debian-unstable mageia-cauldron opensuse-leap-16-1 |
| 28 |
#: opensuse-tumbleweed |
| 29 |
#, no-wrap |
| 30 |
msgid "2026-02-08" |
| 31 |
msgstr "" |
| 32 |
|
| 33 |
#. type: TH |
| 34 |
#: archlinux debian-unstable |
| 35 |
#, no-wrap |
| 36 |
msgid "Linux man-pages 6.18" |
| 37 |
msgstr "" |
| 38 |
|
| 39 |
#. type: SH |
| 40 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 41 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 42 |
#, no-wrap |
| 43 |
msgid "NAME" |
| 44 |
msgstr "" |
| 45 |
|
| 46 |
#. type: Plain text |
| 47 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 48 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 49 |
msgid "listxattr, llistxattr, flistxattr - list extended attribute names" |
| 50 |
msgstr "" |
| 51 |
|
| 52 |
#. type: SH |
| 53 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 54 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 55 |
#, no-wrap |
| 56 |
msgid "LIBRARY" |
| 57 |
msgstr "" |
| 58 |
|
| 59 |
#. type: Plain text |
| 60 |
#: archlinux debian-unstable fedora-44 fedora-rawhide mageia-cauldron |
| 61 |
#: opensuse-leap-16-1 opensuse-tumbleweed |
| 62 |
msgid "Standard C library (I<libc>,\\ I<-lc>)" |
| 63 |
msgstr "" |
| 64 |
|
| 65 |
#. type: SH |
| 66 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 67 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 68 |
#, no-wrap |
| 69 |
msgid "SYNOPSIS" |
| 70 |
msgstr "" |
| 71 |
|
| 72 |
#. type: Plain text |
| 73 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 74 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 75 |
#, no-wrap |
| 76 |
msgid "B<#include E<lt>sys/xattr.hE<gt>>\n" |
| 77 |
msgstr "" |
| 78 |
|
| 79 |
#. type: Plain text |
| 80 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 81 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 82 |
#, no-wrap |
| 83 |
msgid "" |
| 84 |
"B<ssize_t listxattr(const char *>I<path>B<, char *_Nullable >I<list>B<, size_t >I<size>B<);>\n" |
| 85 |
"B<ssize_t llistxattr(const char *>I<path>B<, char *_Nullable >I<list>B<, size_t >I<size>B<);>\n" |
| 86 |
"B<ssize_t flistxattr(int >I<fd>B<, char *_Nullable >I<list>B<, size_t >I<size>B<);>\n" |
| 87 |
msgstr "" |
| 88 |
|
| 89 |
#. type: SH |
| 90 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 91 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 92 |
#, no-wrap |
| 93 |
msgid "DESCRIPTION" |
| 94 |
msgstr "" |
| 95 |
|
| 96 |
#. type: Plain text |
| 97 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 98 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 99 |
msgid "" |
| 100 |
"Extended attributes are I<name>:I<value> pairs associated with inodes " |
| 101 |
"(files, directories, symbolic links, etc.). They are extensions to the " |
| 102 |
"normal attributes which are associated with all inodes in the system (i.e., " |
| 103 |
"the B<stat>(2) data). A complete overview of extended attributes concepts " |
| 104 |
"can be found in B<xattr>(7)." |
| 105 |
msgstr "" |
| 106 |
|
| 107 |
#. type: Plain text |
| 108 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 109 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 110 |
msgid "" |
| 111 |
"B<listxattr>() retrieves the list of extended attribute names associated " |
| 112 |
"with the given I<path> in the filesystem. The retrieved list is placed in " |
| 113 |
"I<list>, a caller-allocated buffer whose size (in bytes) is specified in the " |
| 114 |
"argument I<size>. The list is the set of (null-terminated) names, one after " |
| 115 |
"the other. Names of extended attributes to which the calling process does " |
| 116 |
"not have access may be omitted from the list. The length of the attribute " |
| 117 |
"name I<list> is returned." |
| 118 |
msgstr "" |
| 119 |
|
| 120 |
#. type: Plain text |
| 121 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 122 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 123 |
msgid "" |
| 124 |
"B<llistxattr>() is identical to B<listxattr>(), except in the case of a " |
| 125 |
"symbolic link, where the list of names of extended attributes associated " |
| 126 |
"with the link itself is retrieved, not the file that it refers to." |
| 127 |
msgstr "" |
| 128 |
|
| 129 |
#. type: Plain text |
| 130 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 131 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 132 |
msgid "" |
| 133 |
"B<flistxattr>() is identical to B<listxattr>(), only the open file referred " |
| 134 |
"to by I<fd> (as returned by B<open>(2)) is interrogated in place of I<path>." |
| 135 |
msgstr "" |
| 136 |
|
| 137 |
#. type: Plain text |
| 138 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 139 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 140 |
msgid "" |
| 141 |
"A single extended attribute I<name> is a null-terminated string. The name " |
| 142 |
"includes a namespace prefix; there may be several, disjoint namespaces " |
| 143 |
"associated with an individual inode." |
| 144 |
msgstr "" |
| 145 |
|
| 146 |
#. type: Plain text |
| 147 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 148 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 149 |
msgid "" |
| 150 |
"If I<size> is specified as zero, these calls return the current size of the " |
| 151 |
"list of extended attribute names (and leave I<list> unchanged). This can be " |
| 152 |
"used to determine the size of the buffer that should be supplied in a " |
| 153 |
"subsequent call. (But, bear in mind that there is a possibility that the " |
| 154 |
"set of extended attributes may change between the two calls, so that it is " |
| 155 |
"still necessary to check the return status from the second call.)" |
| 156 |
msgstr "" |
| 157 |
|
| 158 |
#. type: SS |
| 159 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 160 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 161 |
#, no-wrap |
| 162 |
msgid "Example" |
| 163 |
msgstr "" |
| 164 |
|
| 165 |
#. type: Plain text |
| 166 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 167 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 168 |
msgid "" |
| 169 |
"The I<list> of names is returned as an unordered array of null-terminated " |
| 170 |
"character strings (attribute names are separated by null bytes (\\[aq]\\" |
| 171 |
"[rs]0\\[aq])), like this:" |
| 172 |
msgstr "" |
| 173 |
|
| 174 |
#. type: Plain text |
| 175 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 176 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 177 |
#, no-wrap |
| 178 |
msgid "user.name1\\[rs]0system.name1\\[rs]0user.name2\\[rs]0\n" |
| 179 |
msgstr "" |
| 180 |
|
| 181 |
#. type: Plain text |
| 182 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 183 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 184 |
msgid "" |
| 185 |
"Filesystems that implement POSIX ACLs using extended attributes might return " |
| 186 |
"a I<list> like this:" |
| 187 |
msgstr "" |
| 188 |
|
| 189 |
#. type: Plain text |
| 190 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 191 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 192 |
#, no-wrap |
| 193 |
msgid "system.posix_acl_access\\[rs]0system.posix_acl_default\\[rs]0\n" |
| 194 |
msgstr "" |
| 195 |
|
| 196 |
#. type: SH |
| 197 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 198 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 199 |
#, no-wrap |
| 200 |
msgid "RETURN VALUE" |
| 201 |
msgstr "" |
| 202 |
|
| 203 |
#. type: Plain text |
| 204 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 205 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 206 |
msgid "" |
| 207 |
"On success, a nonnegative number is returned indicating the size of the " |
| 208 |
"extended attribute name list. On failure, -1 is returned and I<errno> is " |
| 209 |
"set to indicate the error." |
| 210 |
msgstr "" |
| 211 |
|
| 212 |
#. type: SH |
| 213 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 214 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 215 |
#, no-wrap |
| 216 |
msgid "ERRORS" |
| 217 |
msgstr "" |
| 218 |
|
| 219 |
#. type: TP |
| 220 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 221 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 222 |
#, no-wrap |
| 223 |
msgid "B<E2BIG>" |
| 224 |
msgstr "" |
| 225 |
|
| 226 |
#. type: Plain text |
| 227 |
#: archlinux debian-unstable mageia-cauldron opensuse-leap-16-1 |
| 228 |
#: opensuse-tumbleweed |
| 229 |
msgid "" |
| 230 |
"The size of the list of extended attribute names is larger than the maximum " |
| 231 |
"size allowed; the list cannot be retrieved. This can happen on filesystems " |
| 232 |
"that support an unlimited number of extended attributes per file, such as " |
| 233 |
"XFS, for example. See BUGS." |
| 234 |
msgstr "" |
| 235 |
|
| 236 |
#. type: TP |
| 237 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 238 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 239 |
#, no-wrap |
| 240 |
msgid "B<ENOTSUP>" |
| 241 |
msgstr "" |
| 242 |
|
| 243 |
#. type: Plain text |
| 244 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 245 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 246 |
msgid "" |
| 247 |
"Extended attributes are not supported by the filesystem, or are disabled." |
| 248 |
msgstr "" |
| 249 |
|
| 250 |
#. type: TP |
| 251 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 252 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 253 |
#, no-wrap |
| 254 |
msgid "B<ERANGE>" |
| 255 |
msgstr "" |
| 256 |
|
| 257 |
#. type: Plain text |
| 258 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 259 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 260 |
msgid "The I<size> of the I<list> buffer is too small to hold the result." |
| 261 |
msgstr "" |
| 262 |
|
| 263 |
#. type: Plain text |
| 264 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 265 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 266 |
msgid "In addition, the errors documented in B<stat>(2) can also occur." |
| 267 |
msgstr "" |
| 268 |
|
| 269 |
#. type: SH |
| 270 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 271 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 272 |
#, no-wrap |
| 273 |
msgid "STANDARDS" |
| 274 |
msgstr "" |
| 275 |
|
| 276 |
#. type: Plain text |
| 277 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 278 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 279 |
msgid "Linux." |
| 280 |
msgstr "" |
| 281 |
|
| 282 |
#. type: SH |
| 283 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 284 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 285 |
#, no-wrap |
| 286 |
msgid "HISTORY" |
| 287 |
msgstr "" |
| 288 |
|
| 289 |
#. .SH AUTHORS |
| 290 |
#. Andreas Gruenbacher, |
| 291 |
#. .RI < [email protected] > |
| 292 |
#. and the SGI XFS development team, |
| 293 |
#. .RI < [email protected] >. |
| 294 |
#. Please send any bug reports or comments to these addresses. |
| 295 |
#. type: Plain text |
| 296 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 297 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 298 |
msgid "Linux 2.4, glibc 2.3." |
| 299 |
msgstr "" |
| 300 |
|
| 301 |
#. type: SH |
| 302 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 303 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 304 |
#, no-wrap |
| 305 |
msgid "BUGS" |
| 306 |
msgstr "" |
| 307 |
|
| 308 |
#. The xattr(7) page refers to this text: |
| 309 |
#. type: Plain text |
| 310 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 311 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 312 |
msgid "" |
| 313 |
"As noted in B<xattr>(7), the VFS imposes a limit of 64\\ kB on the size of " |
| 314 |
"the extended attribute name list returned by B<listxattr>(). If the total " |
| 315 |
"size of attribute names attached to a file exceeds this limit, it is no " |
| 316 |
"longer possible to retrieve the list of attribute names." |
| 317 |
msgstr "" |
| 318 |
|
| 319 |
#. type: SH |
| 320 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 321 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 322 |
#, no-wrap |
| 323 |
msgid "EXAMPLES" |
| 324 |
msgstr "" |
| 325 |
|
| 326 |
#. type: Plain text |
| 327 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 328 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 329 |
msgid "" |
| 330 |
"The following program demonstrates the usage of B<listxattr>() and " |
| 331 |
"B<getxattr>(2). For the file whose pathname is provided as a command-line " |
| 332 |
"argument, it lists all extended file attributes and their values." |
| 333 |
msgstr "" |
| 334 |
|
| 335 |
#. type: Plain text |
| 336 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 337 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 338 |
msgid "" |
| 339 |
"To keep the code simple, the program assumes that attribute keys and values " |
| 340 |
"are constant during the execution of the program. A production program " |
| 341 |
"should expect and handle changes during execution of the program. For " |
| 342 |
"example, the number of bytes required for attribute keys might increase " |
| 343 |
"between the two calls to B<listxattr>(). An application could handle this " |
| 344 |
"possibility using a loop that retries the call (perhaps up to a " |
| 345 |
"predetermined maximum number of attempts) with a larger buffer each time it " |
| 346 |
"fails with the error B<ERANGE>. Calls to B<getxattr>(2) could be handled " |
| 347 |
"similarly." |
| 348 |
msgstr "" |
| 349 |
|
| 350 |
#. type: Plain text |
| 351 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 352 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 353 |
msgid "" |
| 354 |
"The following output was recorded by first creating a file, setting some " |
| 355 |
"extended file attributes, and then listing the attributes with the example " |
| 356 |
"program." |
| 357 |
msgstr "" |
| 358 |
|
| 359 |
#. type: SS |
| 360 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 361 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 362 |
#, no-wrap |
| 363 |
msgid "Example output" |
| 364 |
msgstr "" |
| 365 |
|
| 366 |
#. type: Plain text |
| 367 |
#: archlinux debian-unstable mageia-cauldron opensuse-leap-16-1 |
| 368 |
#: opensuse-tumbleweed |
| 369 |
#, no-wrap |
| 370 |
msgid "" |
| 371 |
"$B< touch /tmp/foo>;\n" |
| 372 |
"$B< setfattr -n user.fred -v chocolate /tmp/foo>;\n" |
| 373 |
"$B< setfattr -n user.frieda -v bar /tmp/foo>;\n" |
| 374 |
"$B< setfattr -n user.empty /tmp/foo>;\n" |
| 375 |
"$B< ./listxattr /tmp/foo>;\n" |
| 376 |
"user.fred: chocolate\n" |
| 377 |
"user.frieda: bar\n" |
| 378 |
"user.empty: E<lt>no valueE<gt>\n" |
| 379 |
msgstr "" |
| 380 |
|
| 381 |
#. type: SS |
| 382 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 383 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 384 |
#, no-wrap |
| 385 |
msgid "Program source (listxattr.c)" |
| 386 |
msgstr "" |
| 387 |
|
| 388 |
#. type: Plain text |
| 389 |
#: archlinux debian-unstable mageia-cauldron opensuse-leap-16-1 |
| 390 |
#: opensuse-tumbleweed |
| 391 |
#, no-wrap |
| 392 |
msgid "" |
| 393 |
"#include E<lt>stdio.hE<gt>\n" |
| 394 |
"#include E<lt>stdlib.hE<gt>\n" |
| 395 |
"#include E<lt>string.hE<gt>\n" |
| 396 |
"#include E<lt>sys/xattr.hE<gt>\n" |
| 397 |
"\\&\n" |
| 398 |
"int\n" |
| 399 |
"main(int argc, char *argv[])\n" |
| 400 |
"{\n" |
| 401 |
" char *buf, *key, *val;\n" |
| 402 |
" ssize_t buflen, keylen, vallen;\n" |
| 403 |
"\\&\n" |
| 404 |
" if (argc != 2) {\n" |
| 405 |
" fprintf(stderr, \"Usage: %s path\\[rs]n\", argv[0]);\n" |
| 406 |
" exit(EXIT_FAILURE);\n" |
| 407 |
" }\n" |
| 408 |
"\\&\n" |
| 409 |
" /*\n" |
| 410 |
" * Determine the length of the buffer needed.\n" |
| 411 |
" */\n" |
| 412 |
" buflen = listxattr(argv[1], NULL, 0);\n" |
| 413 |
" if (buflen == -1) {\n" |
| 414 |
" perror(\"listxattr\");\n" |
| 415 |
" exit(EXIT_FAILURE);\n" |
| 416 |
" }\n" |
| 417 |
" if (buflen == 0) {\n" |
| 418 |
" printf(\"%s has no attributes.\\[rs]n\", argv[1]);\n" |
| 419 |
" exit(EXIT_SUCCESS);\n" |
| 420 |
" }\n" |
| 421 |
"\\&\n" |
| 422 |
" /*\n" |
| 423 |
" * Allocate the buffer.\n" |
| 424 |
" */\n" |
| 425 |
" buf = malloc(buflen);\n" |
| 426 |
" if (buf == NULL) {\n" |
| 427 |
" perror(\"malloc\");\n" |
| 428 |
" exit(EXIT_FAILURE);\n" |
| 429 |
" }\n" |
| 430 |
"\\&\n" |
| 431 |
" /*\n" |
| 432 |
" * Copy the list of attribute keys to the buffer.\n" |
| 433 |
" */\n" |
| 434 |
" buflen = listxattr(argv[1], buf, buflen);\n" |
| 435 |
" if (buflen == -1) {\n" |
| 436 |
" perror(\"listxattr\");\n" |
| 437 |
" exit(EXIT_FAILURE);\n" |
| 438 |
" }\n" |
| 439 |
"\\&\n" |
| 440 |
" /*\n" |
| 441 |
" * Loop over the list of zero terminated strings with the\n" |
| 442 |
" * attribute keys. Use the remaining buffer length to determine\n" |
| 443 |
" * the end of the list.\n" |
| 444 |
" */\n" |
| 445 |
" key = buf;\n" |
| 446 |
" while (buflen E<gt> 0) {\n" |
| 447 |
"\\&\n" |
| 448 |
" /*\n" |
| 449 |
" * Output attribute key.\n" |
| 450 |
" */\n" |
| 451 |
" printf(\"%s: \", key);\n" |
| 452 |
"\\&\n" |
| 453 |
" /*\n" |
| 454 |
" * Determine length of the value.\n" |
| 455 |
" */\n" |
| 456 |
" vallen = getxattr(argv[1], key, NULL, 0);\n" |
| 457 |
" if (vallen == -1)\n" |
| 458 |
" perror(\"getxattr\");\n" |
| 459 |
"\\&\n" |
| 460 |
" if (vallen E<gt> 0) {\n" |
| 461 |
"\\&\n" |
| 462 |
" /*\n" |
| 463 |
" * Allocate value buffer.\n" |
| 464 |
" * One extra byte is needed to append 0x00.\n" |
| 465 |
" */\n" |
| 466 |
" val = malloc(vallen + 1);\n" |
| 467 |
" if (val == NULL) {\n" |
| 468 |
" perror(\"malloc\");\n" |
| 469 |
" exit(EXIT_FAILURE);\n" |
| 470 |
" }\n" |
| 471 |
"\\&\n" |
| 472 |
" /*\n" |
| 473 |
" * Copy value to buffer.\n" |
| 474 |
" */\n" |
| 475 |
" vallen = getxattr(argv[1], key, val, vallen);\n" |
| 476 |
" if (vallen == -1) {\n" |
| 477 |
" perror(\"getxattr\");\n" |
| 478 |
" } else {\n" |
| 479 |
" /*\n" |
| 480 |
" * Output attribute value.\n" |
| 481 |
" */\n" |
| 482 |
" val[vallen] = 0;\n" |
| 483 |
" printf(\"%s\", val);\n" |
| 484 |
" }\n" |
| 485 |
"\\&\n" |
| 486 |
" free(val);\n" |
| 487 |
" } else if (vallen == 0) {\n" |
| 488 |
" printf(\"E<lt>no valueE<gt>\");\n" |
| 489 |
" }\n" |
| 490 |
"\\&\n" |
| 491 |
" printf(\"\\[rs]n\");\n" |
| 492 |
"\\&\n" |
| 493 |
" /*\n" |
| 494 |
" * Forward to next attribute key.\n" |
| 495 |
" */\n" |
| 496 |
" keylen = strlen(key) + 1;\n" |
| 497 |
" buflen -= keylen;\n" |
| 498 |
" key += keylen;\n" |
| 499 |
" }\n" |
| 500 |
"\\&\n" |
| 501 |
" free(buf);\n" |
| 502 |
" exit(EXIT_SUCCESS);\n" |
| 503 |
"}\n" |
| 504 |
msgstr "" |
| 505 |
|
| 506 |
#. SRC END |
| 507 |
#. type: SH |
| 508 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 509 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 510 |
#, no-wrap |
| 511 |
msgid "SEE ALSO" |
| 512 |
msgstr "" |
| 513 |
|
| 514 |
#. type: Plain text |
| 515 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 516 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 517 |
msgid "" |
| 518 |
"B<getfattr>(1), B<setfattr>(1), B<getxattr>(2), B<open>(2), " |
| 519 |
"B<removexattr>(2), B<setxattr>(2), B<stat>(2), B<symlink>(7), B<xattr>(7)" |
| 520 |
msgstr "" |
| 521 |
|
| 522 |
#. type: TH |
| 523 |
#: debian-trixie |
| 524 |
#, no-wrap |
| 525 |
msgid "2024-06-15" |
| 526 |
msgstr "" |
| 527 |
|
| 528 |
#. type: TH |
| 529 |
#: debian-trixie |
| 530 |
#, no-wrap |
| 531 |
msgid "Linux man-pages 6.9.1" |
| 532 |
msgstr "" |
| 533 |
|
| 534 |
#. type: Plain text |
| 535 |
#: debian-trixie |
| 536 |
msgid "Standard C library (I<libc>, I<-lc>)" |
| 537 |
msgstr "" |
| 538 |
|
| 539 |
#. type: Plain text |
| 540 |
#: debian-trixie fedora-44 fedora-rawhide |
| 541 |
msgid "" |
| 542 |
"The size of the list of extended attribute names is larger than the maximum " |
| 543 |
"size allowed; the list cannot be retrieved. This can happen on filesystems " |
| 544 |
"that support an unlimited number of extended attributes per file such as " |
| 545 |
"XFS, for example. See BUGS." |
| 546 |
msgstr "" |
| 547 |
|
| 548 |
#. type: Plain text |
| 549 |
#: debian-trixie fedora-44 fedora-rawhide |
| 550 |
#, no-wrap |
| 551 |
msgid "" |
| 552 |
"$ B<touch /tmp/foo>\n" |
| 553 |
"$ B<setfattr -n user.fred -v chocolate /tmp/foo>\n" |
| 554 |
"$ B<setfattr -n user.frieda -v bar /tmp/foo>\n" |
| 555 |
"$ B<setfattr -n user.empty /tmp/foo>\n" |
| 556 |
"$ B<./listxattr /tmp/foo>\n" |
| 557 |
"user.fred: chocolate\n" |
| 558 |
"user.frieda: bar\n" |
| 559 |
"user.empty: E<lt>no valueE<gt>\n" |
| 560 |
msgstr "" |
| 561 |
|
| 562 |
#. type: Plain text |
| 563 |
#: debian-trixie fedora-44 fedora-rawhide |
| 564 |
#, no-wrap |
| 565 |
msgid "" |
| 566 |
"#include E<lt>stdio.hE<gt>\n" |
| 567 |
"#include E<lt>stdlib.hE<gt>\n" |
| 568 |
"#include E<lt>string.hE<gt>\n" |
| 569 |
"#include E<lt>sys/xattr.hE<gt>\n" |
| 570 |
"\\&\n" |
| 571 |
"int\n" |
| 572 |
"main(int argc, char *argv[])\n" |
| 573 |
"{\n" |
| 574 |
" char *buf, *key, *val;\n" |
| 575 |
" ssize_t buflen, keylen, vallen;\n" |
| 576 |
"\\&\n" |
| 577 |
" if (argc != 2) {\n" |
| 578 |
" fprintf(stderr, \"Usage: %s path\\[rs]n\", argv[0]);\n" |
| 579 |
" exit(EXIT_FAILURE);\n" |
| 580 |
" }\n" |
| 581 |
"\\&\n" |
| 582 |
" /*\n" |
| 583 |
" * Determine the length of the buffer needed.\n" |
| 584 |
" */\n" |
| 585 |
" buflen = listxattr(argv[1], NULL, 0);\n" |
| 586 |
" if (buflen == -1) {\n" |
| 587 |
" perror(\"listxattr\");\n" |
| 588 |
" exit(EXIT_FAILURE);\n" |
| 589 |
" }\n" |
| 590 |
" if (buflen == 0) {\n" |
| 591 |
" printf(\"%s has no attributes.\\[rs]n\", argv[1]);\n" |
| 592 |
" exit(EXIT_SUCCESS);\n" |
| 593 |
" }\n" |
| 594 |
"\\&\n" |
| 595 |
" /*\n" |
| 596 |
" * Allocate the buffer.\n" |
| 597 |
" */\n" |
| 598 |
" buf = malloc(buflen);\n" |
| 599 |
" if (buf == NULL) {\n" |
| 600 |
" perror(\"malloc\");\n" |
| 601 |
" exit(EXIT_FAILURE);\n" |
| 602 |
" }\n" |
| 603 |
"\\&\n" |
| 604 |
" /*\n" |
| 605 |
" * Copy the list of attribute keys to the buffer.\n" |
| 606 |
" */\n" |
| 607 |
" buflen = listxattr(argv[1], buf, buflen);\n" |
| 608 |
" if (buflen == -1) {\n" |
| 609 |
" perror(\"listxattr\");\n" |
| 610 |
" exit(EXIT_FAILURE);\n" |
| 611 |
" }\n" |
| 612 |
"\\&\n" |
| 613 |
" /*\n" |
| 614 |
" * Loop over the list of zero terminated strings with the\n" |
| 615 |
" * attribute keys. Use the remaining buffer length to determine\n" |
| 616 |
" * the end of the list.\n" |
| 617 |
" */\n" |
| 618 |
" key = buf;\n" |
| 619 |
" while (buflen E<gt> 0) {\n" |
| 620 |
"\\&\n" |
| 621 |
" /*\n" |
| 622 |
" * Output attribute key.\n" |
| 623 |
" */\n" |
| 624 |
" printf(\"%s: \", key);\n" |
| 625 |
"\\&\n" |
| 626 |
" /*\n" |
| 627 |
" * Determine length of the value.\n" |
| 628 |
" */\n" |
| 629 |
" vallen = getxattr(argv[1], key, NULL, 0);\n" |
| 630 |
" if (vallen == -1)\n" |
| 631 |
" perror(\"getxattr\");\n" |
| 632 |
"\\&\n" |
| 633 |
" if (vallen E<gt> 0) {\n" |
| 634 |
"\\&\n" |
| 635 |
" /*\n" |
| 636 |
" * Allocate value buffer.\n" |
| 637 |
" * One extra byte is needed to append 0x00.\n" |
| 638 |
" */\n" |
| 639 |
" val = malloc(vallen + 1);\n" |
| 640 |
" if (val == NULL) {\n" |
| 641 |
" perror(\"malloc\");\n" |
| 642 |
" exit(EXIT_FAILURE);\n" |
| 643 |
" }\n" |
| 644 |
"\\&\n" |
| 645 |
" /*\n" |
| 646 |
" * Copy value to buffer.\n" |
| 647 |
" */\n" |
| 648 |
" vallen = getxattr(argv[1], key, val, vallen);\n" |
| 649 |
" if (vallen == -1) {\n" |
| 650 |
" perror(\"getxattr\");\n" |
| 651 |
" } else {\n" |
| 652 |
" /*\n" |
| 653 |
" * Output attribute value.\n" |
| 654 |
" */\n" |
| 655 |
" val[vallen] = 0;\n" |
| 656 |
" printf(\"%s\", val);\n" |
| 657 |
" }\n" |
| 658 |
"\\&\n" |
| 659 |
" free(val);\n" |
| 660 |
" } else if (vallen == 0) {\n" |
| 661 |
" printf(\"E<lt>no valueE<gt>\");\n" |
| 662 |
" }\n" |
| 663 |
"\\&\n" |
| 664 |
" printf(\"\\[rs]n\");\n" |
| 665 |
"\\&\n" |
| 666 |
" /*\n" |
| 667 |
" * Forward to next attribute key.\n" |
| 668 |
" */\n" |
| 669 |
" keylen = strlen(key) + 1;\n" |
| 670 |
" buflen -= keylen;\n" |
| 671 |
" key += keylen;\n" |
| 672 |
" }\n" |
| 673 |
"\\&\n" |
| 674 |
" free(buf);\n" |
| 675 |
" exit(EXIT_SUCCESS);\n" |
| 676 |
"}\n" |
| 677 |
msgstr "" |
| 678 |
|
| 679 |
#. type: TH |
| 680 |
#: fedora-44 fedora-rawhide |
| 681 |
#, no-wrap |
| 682 |
msgid "2024-07-23" |
| 683 |
msgstr "" |
| 684 |
|
| 685 |
#. type: TH |
| 686 |
#: fedora-44 fedora-rawhide |
| 687 |
#, no-wrap |
| 688 |
msgid "Linux man-pages 6.13" |
| 689 |
msgstr "" |
| 690 |
|
| 691 |
#. type: TH |
| 692 |
#: mageia-cauldron |
| 693 |
#, no-wrap |
| 694 |
msgid "Linux man-pages 6.17" |
| 695 |
msgstr "" |
| 696 |
|
| 697 |
#. type: TH |
| 698 |
#: opensuse-leap-16-1 opensuse-tumbleweed |
| 699 |
#, no-wrap |
| 700 |
msgid "Linux man-pages (unreleased)" |
| 701 |
msgstr "" |