summaryrefslogtreecommitdiff
path: root/usr.bin/tcfs/tcfs_getstatus.c
blob: 2fbb195cd48ef23f1e669f12c8cb262a2531f594 (plain)
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
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
/*	$OpenBSD: tcfs_getstatus.c,v 1.3 2000/06/19 22:42:28 aaron Exp $	*/

/*
 *	Transparent Cryptographic File System (TCFS) for NetBSD 
 *	Author and mantainer: 	Luigi Catuogno [luicat@tcfs.unisa.it]
 *	
 *	references:		http://tcfs.dia.unisa.it
 *				tcfs-bsd@tcfs.unisa.it
 */

/*
 *	Base utility set v0.1
 */

#include <ctype.h>
#include <pwd.h>
#include <unistd.h>
#include <sys/types.h>
#include <sys/param.h>
#include <sys/mount.h>
#include <des.h>
#include <miscfs/tcfs/tcfs.h>
#include <miscfs/tcfs/tcfs_cmd.h>
#include "tcfsdefines.h"
#include <sys/ucred.h>


int
tcfs_getstatus(char *filesystem, struct tcfs_status *st)
{
	int i;
	struct tcfs_args x;

	if (!tcfs_verify_fs(filesystem))
		return (-1);	

	x.cmd = TCFS_GET_STATUS;
	i = tcfs_callfunction(filesystem, &x);
	*st = x.st;
	return (i);
}