1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26
|
/*
* Copyright (C) 1999-2000 by CERN/IT/PDP/DM
* All rights reserved
*/
#ifndef lint
static char sccsid[] = "@(#)$RCSfile: Cns_umask.c,v $ $Revision: 1.1.1.1 $ $Date: 2000/05/29 11:38:53 $ CERN IT-PDP/DM Jean-Philippe Baud";
#endif /* not lint */
/* Cns_umask - get and set CASTOR file creation mask */
#include <sys/types.h>
#include "Cns_api.h"
mode_t DLL_DECL
Cns_umask(mode_t cmask)
{
mode_t oldmask;
struct Cns_api_thread_info *thip;
if (Cns_apiinit (&thip))
return (-1);
oldmask = thip->mask;
thip->mask = cmask & 0777;
return (oldmask);
}
|