file-systems: Add file system to *-SUPERBLOCK-VOLUME-NAME docstrings.
* gnu/build/file-systems.scm (ext2-superblock-volume-name) (bcachefs-superblock-volume-name, btrfs-superblock-volume-name) (fat32-superblock-volume-name, fat16-superblock-volume-name) (iso9660-superblock-volume-name, jfs-superblock-volume-name) (f2fs-superblock-volume-name): Mention the file system type in the docstring for consistency with the other superblock procedures.
This commit is contained in:
		
							parent
							
								
									cd19c920b7
								
							
						
					
					
						commit
						09a8fb1f37
					
				
					 1 changed files with 18 additions and 18 deletions
				
			
		| 
						 | 
					@ -166,8 +166,8 @@ if DEVICE does not contain an ext2 file system."
 | 
				
			||||||
  (sub-bytevector sblock 104 16))
 | 
					  (sub-bytevector sblock 104 16))
 | 
				
			||||||
 | 
					
 | 
				
			||||||
(define (ext2-superblock-volume-name sblock)
 | 
					(define (ext2-superblock-volume-name sblock)
 | 
				
			||||||
  "Return the volume name of SBLOCK as a string of at most 16 characters, or
 | 
					  "Return the volume name of ext2 superblock SBLOCK as a string of at most 16
 | 
				
			||||||
#f if SBLOCK has no volume name."
 | 
					characters, or #f if SBLOCK has no volume name."
 | 
				
			||||||
  (null-terminated-latin1->string (sub-bytevector sblock 120 16)))
 | 
					  (null-terminated-latin1->string (sub-bytevector sblock 120 16)))
 | 
				
			||||||
 | 
					
 | 
				
			||||||
(define (check-ext2-file-system device force? repair)
 | 
					(define (check-ext2-file-system device force? repair)
 | 
				
			||||||
| 
						 | 
					@ -265,8 +265,8 @@ bytevector."
 | 
				
			||||||
  (sub-bytevector sblock 56 16))
 | 
					  (sub-bytevector sblock 56 16))
 | 
				
			||||||
 | 
					
 | 
				
			||||||
(define (bcachefs-superblock-volume-name sblock)
 | 
					(define (bcachefs-superblock-volume-name sblock)
 | 
				
			||||||
  "Return the volume name of SBLOCK as a string of at most 32 characters, or
 | 
					  "Return the volume name of bcachefs superblock SBLOCK as a string of at most
 | 
				
			||||||
#f if SBLOCK has no volume name."
 | 
					32 characters, or #f if SBLOCK has no volume name."
 | 
				
			||||||
  (null-terminated-latin1->string (sub-bytevector sblock 72 32)))
 | 
					  (null-terminated-latin1->string (sub-bytevector sblock 72 32)))
 | 
				
			||||||
 | 
					
 | 
				
			||||||
(define (check-bcachefs-file-system device force? repair)
 | 
					(define (check-bcachefs-file-system device force? repair)
 | 
				
			||||||
| 
						 | 
					@ -317,8 +317,8 @@ if DEVICE does not contain a btrfs file system."
 | 
				
			||||||
  (sub-bytevector sblock 32 16))
 | 
					  (sub-bytevector sblock 32 16))
 | 
				
			||||||
 | 
					
 | 
				
			||||||
(define (btrfs-superblock-volume-name sblock)
 | 
					(define (btrfs-superblock-volume-name sblock)
 | 
				
			||||||
  "Return the volume name of SBLOCK as a string of at most 256 characters, or
 | 
					  "Return the volume name of btrfs superblock SBLOCK as a string of at most 256
 | 
				
			||||||
#f if SBLOCK has no volume name."
 | 
					characters, or #f if SBLOCK has no volume name."
 | 
				
			||||||
  (null-terminated-latin1->string (sub-bytevector sblock 299 256)))
 | 
					  (null-terminated-latin1->string (sub-bytevector sblock 299 256)))
 | 
				
			||||||
 | 
					
 | 
				
			||||||
(define (check-btrfs-file-system device force? repair)
 | 
					(define (check-btrfs-file-system device force? repair)
 | 
				
			||||||
| 
						 | 
					@ -364,9 +364,9 @@ fix only those considered safe to repair automatically."
 | 
				
			||||||
  (sub-bytevector sblock 67 4))
 | 
					  (sub-bytevector sblock 67 4))
 | 
				
			||||||
 | 
					
 | 
				
			||||||
(define (fat32-superblock-volume-name sblock)
 | 
					(define (fat32-superblock-volume-name sblock)
 | 
				
			||||||
  "Return the volume name of SBLOCK as a string of at most 11 characters, or
 | 
					  "Return the volume name of fat superblock SBLOCK as a string of at most 11
 | 
				
			||||||
#f if SBLOCK has no volume name.  The volume name is a latin1 string.
 | 
					characters, or #f if SBLOCK has no volume name.  The volume name is a latin1
 | 
				
			||||||
Trailing spaces are trimmed."
 | 
					string.  Trailing spaces are trimmed."
 | 
				
			||||||
  (string-trim-right (latin1->string (sub-bytevector sblock 71 11) (lambda (c) #f)) #\space))
 | 
					  (string-trim-right (latin1->string (sub-bytevector sblock 71 11) (lambda (c) #f)) #\space))
 | 
				
			||||||
 | 
					
 | 
				
			||||||
(define (check-fat-file-system device force? repair)
 | 
					(define (check-fat-file-system device force? repair)
 | 
				
			||||||
| 
						 | 
					@ -404,9 +404,9 @@ using the least destructive approach."
 | 
				
			||||||
  (sub-bytevector sblock 39 4))
 | 
					  (sub-bytevector sblock 39 4))
 | 
				
			||||||
 | 
					
 | 
				
			||||||
(define (fat16-superblock-volume-name sblock)
 | 
					(define (fat16-superblock-volume-name sblock)
 | 
				
			||||||
  "Return the volume name of SBLOCK as a string of at most 11 characters, or
 | 
					  "Return the volume name of fat superblock SBLOCK as a string of at most 11
 | 
				
			||||||
#f if SBLOCK has no volume name.  The volume name is a latin1 string.
 | 
					characters, or #f if SBLOCK has no volume name.  The volume name is a latin1
 | 
				
			||||||
Trailing spaces are trimmed."
 | 
					string.  Trailing spaces are trimmed."
 | 
				
			||||||
  (string-trim-right (latin1->string (sub-bytevector sblock 43 11)
 | 
					  (string-trim-right (latin1->string (sub-bytevector sblock 43 11)
 | 
				
			||||||
                                     (lambda (c) #f))
 | 
					                                     (lambda (c) #f))
 | 
				
			||||||
                     #\space))
 | 
					                     #\space))
 | 
				
			||||||
| 
						 | 
					@ -465,8 +465,8 @@ SBLOCK as a bytevector.  If that's not set, returns the creation time."
 | 
				
			||||||
    (sub-bytevector time 0 16))) ; strips GMT offset.
 | 
					    (sub-bytevector time 0 16))) ; strips GMT offset.
 | 
				
			||||||
 | 
					
 | 
				
			||||||
(define (iso9660-superblock-volume-name sblock)
 | 
					(define (iso9660-superblock-volume-name sblock)
 | 
				
			||||||
  "Return the volume name of SBLOCK as a string.  The volume name is an ASCII
 | 
					  "Return the volume name of iso9660 superblock SBLOCK as a string.  The volume
 | 
				
			||||||
string.  Trailing spaces are trimmed."
 | 
					name is an ASCII string.  Trailing spaces are trimmed."
 | 
				
			||||||
  ;; Note: Valid characters are of the set "[0-9][A-Z]_" (ECMA-119 Appendix A)
 | 
					  ;; Note: Valid characters are of the set "[0-9][A-Z]_" (ECMA-119 Appendix A)
 | 
				
			||||||
  (string-trim-right (latin1->string (sub-bytevector sblock 40 32)
 | 
					  (string-trim-right (latin1->string (sub-bytevector sblock 40 32)
 | 
				
			||||||
                                     (lambda (c) #f)) #\space))
 | 
					                                     (lambda (c) #f)) #\space))
 | 
				
			||||||
| 
						 | 
					@ -497,8 +497,8 @@ if DEVICE does not contain a JFS file system."
 | 
				
			||||||
  (sub-bytevector sblock 136 16))
 | 
					  (sub-bytevector sblock 136 16))
 | 
				
			||||||
 | 
					
 | 
				
			||||||
(define (jfs-superblock-volume-name sblock)
 | 
					(define (jfs-superblock-volume-name sblock)
 | 
				
			||||||
  "Return the volume name of SBLOCK as a string of at most 16 characters, or
 | 
					  "Return the volume name of JFS superblock SBLOCK as a string of at most 16
 | 
				
			||||||
#f if SBLOCK has no volume name."
 | 
					characters, or #f if SBLOCK has no volume name."
 | 
				
			||||||
  (null-terminated-latin1->string (sub-bytevector sblock 152 16)))
 | 
					  (null-terminated-latin1->string (sub-bytevector sblock 152 16)))
 | 
				
			||||||
 | 
					
 | 
				
			||||||
(define (check-jfs-file-system device force? repair)
 | 
					(define (check-jfs-file-system device force? repair)
 | 
				
			||||||
| 
						 | 
					@ -567,8 +567,8 @@ if DEVICE does not contain an F2FS file system."
 | 
				
			||||||
                  16))
 | 
					                  16))
 | 
				
			||||||
 | 
					
 | 
				
			||||||
(define (f2fs-superblock-volume-name sblock)
 | 
					(define (f2fs-superblock-volume-name sblock)
 | 
				
			||||||
  "Return the volume name of SBLOCK as a string of at most 512 characters, or
 | 
					  "Return the volume name of F2FS superblock SBLOCK as a string of at most 512
 | 
				
			||||||
#f if SBLOCK has no volume name."
 | 
					characters, or #f if SBLOCK has no volume name."
 | 
				
			||||||
  (null-terminated-utf16->string
 | 
					  (null-terminated-utf16->string
 | 
				
			||||||
   (sub-bytevector sblock (- (+ #x470 12) #x400) 512)
 | 
					   (sub-bytevector sblock (- (+ #x470 12) #x400) 512)
 | 
				
			||||||
   %f2fs-endianness))
 | 
					   %f2fs-endianness))
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Reference in a new issue