The following issue has been SUBMITTED. 
====================================================================== 
https://austingroupbugs.net/view.php?id=1409 
====================================================================== 
Reported By:                alanc
Assigned To:                
====================================================================== 
Project:                    1003.1(2013)/Issue7+TC1
Issue ID:                   1409
Category:                   System Interfaces
Type:                       Enhancement Request
Severity:                   Editorial
Priority:                   normal
Status:                     New
Name:                       Alan Coopersmith 
Organization:                
User Reference:              
Section:                    fstatat() 
Page Number:                951 
Line Number:                32669 
Interp Status:              --- 
Final Accepted Text:         
====================================================================== 
Date Submitted:             2020-10-08 16:48 UTC
Last Modified:              2020-10-08 16:48 UTC
====================================================================== 
Summary:                    Example code for stat() could use better function
name
Description: 
The example code for stat() currently has:

/* Print out type, permissions, and number of links. */
printf("%10.10s", sperm (statbuf.st_mode));
printf("%4d", statbuf.st_nlink);

It appears that "sperm" is supposed to be a user-provided function to
make a string representing the permission bits of the mode value, but
this isn't clear, and trying to do an internet search for "sperm" to
find if this function exists somewhere is extremely unhelpful.
Desired Action: 
Use a better function name for the user provided function - perhaps
strmode()
that actually exists on some systems, or a clearer made-up-name such as
permission_string() or mode_to_string().  Perhaps update the comment to
note that this is a user-supplied function, not part of the standard.
====================================================================== 

Issue History 
Date Modified    Username       Field                    Change               
====================================================================== 
2020-10-08 16:48 alanc          New Issue                                    
2020-10-08 16:48 alanc          Name                      => Alan Coopersmith
2020-10-08 16:48 alanc          Section                   => fstatat()       
2020-10-08 16:48 alanc          Page Number               => 951             
2020-10-08 16:48 alanc          Line Number               => 32669           
======================================================================


  • [1003.1(2013... Austin Group Bug Tracker via austin-group-l at The Open Group
    • [1003.1... Austin Group Bug Tracker via austin-group-l at The Open Group
    • [1003.1... Austin Group Bug Tracker via austin-group-l at The Open Group
    • [1003.1... Austin Group Bug Tracker via austin-group-l at The Open Group
    • [1003.1... Austin Group Bug Tracker via austin-group-l at The Open Group

Reply via email to