* set_mode - Set the file's date and time * @pathname: Path and name of the file to alter * @mode: Mode using LINUX values * * Give a file a particular mode. * * Return: 0 Success, set the file's mode * -1 Error, failed to change the file's mode */
| 523 | * -1 Error, failed to change the file's mode |
| 524 | */ |
| 525 | int set_mode(const char *pathname, unsigned int mode) |
| 526 | { |
| 527 | #if defined(HAVE_CHMOD) && ! ( defined(__CYGWIN__) || defined(__MINGW32__) || defined(DJGPP) || defined(__OS2__)) |
| 528 | return chmod(pathname, mode_xlate(mode)); |
| 529 | #else |
| 530 | return 0; |
| 531 | #endif |
| 532 | } |
| 533 | |
| 534 | /*@ |
| 535 | @ requires valid_string(fn); |
no test coverage detected