File: Cns_umask.c

package info (click to toggle)
dpm-postgres 1.7.4.7-1
  • links: PTS, VCS
  • area: main
  • in suites: squeeze
  • size: 13,788 kB
  • ctags: 10,782
  • sloc: ansic: 146,136; sh: 13,362; perl: 11,142; python: 5,529; cpp: 5,113; sql: 1,790; makefile: 955; fortran: 113
file content (26 lines) | stat: -rw-r--r-- 562 bytes parent folder | download | duplicates (8)
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);
}