Add k_afs_cell_of_file.

git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@725 ec53bebd-3082-4978-b11e-865c3cabbd6b
This commit is contained in:
Johan Danielsson
1996-09-11 18:23:29 +00:00
parent 87db6dcb90
commit feaa4059db
2 changed files with 16 additions and 4 deletions

View File

@@ -471,6 +471,18 @@ k_pioctl(char *a_path,
return -1;
}
int
k_afs_cell_of_file(const char *path, char *cell, int len)
{
struct ViceIoctl parms;
memset(&parms, 0, sizeof(parms));
parms.in = NULL;
parms.in_size = 0;
parms.out = cell;
parms.out_len = len;
return k_pioctl((char*)path, VIOC_FILE_CELL_NAME, &parms, 1);
}
int
k_unlog(void)
{

View File

@@ -16,10 +16,9 @@
#define _VICEIOCTL(id) ((unsigned int ) _IOW('V', id, struct ViceIoctl))
#endif /* _VICEIOCTL */
#define VIOCSETTOK _VICEIOCTL(3)
#define VIOCUNLOG _VICEIOCTL(9)
#define VIOC_FILE_CELL_NAME _VICEIOCTL(30)
#define VIOCSETTOK _VICEIOCTL(3)
#define VIOCUNLOG _VICEIOCTL(9)
#define VIOC_FILE_CELL_NAME _VICEIOCTL(30)
struct ViceIoctl {
caddr_t in, out;
@@ -47,6 +46,7 @@ int k_pioctl __P((char *a_path,
int a_followSymlinks));
int k_unlog __P((void));
int k_setpag __P((void));
int k_afs_cell_of_file __P((const char *path, char *cell, int len));
#define _PATH_VICE "/usr/vice/etc/"
#define _PATH_THISCELL _PATH_VICE "ThisCell"