* Copyright (c) 1980 The Regents of the University of California.
* This module is believed to contain source code proprietary to AT&T.
* Use and redistribution is subject to the Berkeley Software License
* Agreement and your Software Agreement with AT&T (Western Electric).
static char sccsid
[] = "@(#)chmod_.c 5.2 (Berkeley) 4/12/91";
* chmod - change file mode bits
* integer function chmod (fname, mode)
* character*(*) fname, mode
#include "../libI77/f_errno.h"
long chmod_(name
, mode
, namlen
, modlen
)
if (namlen
>= sizeof nambuf
|| modlen
>= sizeof modbuf
)
return((long)(errno
=F_ERARG
));
g_char(name
, namlen
, nambuf
);
g_char(mode
, modlen
, modbuf
);
return((long)(errno
=ENOENT
));
return((long)(errno
=F_ERARG
));
if (wait(&retcode
) == -1)
execl("/bin/chmod", "chmod", modbuf
, nambuf
, (char *)0);