MCPcopy Create free account
hub / github.com/cgsecurity/testdisk / set_mode

Function set_mode

src/dir.c:525–532  ·  view source on GitHub ↗

* 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 */

Source from the content-addressed store, hash-verified

523 * -1 Error, failed to change the file's mode
524 */
525int 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);

Callers 2

reiser_copyFunction · 0.85
ext2_copyFunction · 0.85

Calls 1

mode_xlateFunction · 0.85

Tested by

no test coverage detected