Esempio n. 1
0
static LISP decode_fstab(struct fstab *p)
{if (p)
   return(symalist("spec",strcons(-1,p->fs_spec),
		   "file",strcons(-1,p->fs_file),
		   "type",strcons(-1,p->fs_type),
		   "freq",flocons(p->fs_freq),
		   "passno",flocons(p->fs_passno),
		   "vfstype",rintern(p->fs_vfstype),
		   "mntops",strcons(-1,p->fs_mntops),
		   NULL));
 else
   return(NIL);}
Esempio n. 2
0
LISP ldecode_pwent(struct passwd *p)
{return(symalist(
		 "name",strcons(strlen(p->pw_name),p->pw_name),
		 "passwd",strcons(strlen(p->pw_passwd),p->pw_passwd),
		 "uid",flocons(p->pw_uid),
		 "gid",flocons(p->pw_gid),
		 "dir",strcons(strlen(p->pw_dir),p->pw_dir),
		 "gecos",strcons(strlen(p->pw_gecos),p->pw_gecos),
/* FIXME: this is horrible */
#if defined(__osf__) || defined(hpux) || defined(sun)
		 "comment",strcons(strlen(p->pw_comment),p->pw_comment),
#endif
#if defined(hpux) || defined(sun)
		 "age",strcons(strlen(p->pw_age),p->pw_age),
#endif
#if defined(__osf__)
		 "quota",flocons(p->pw_quota),
#endif
		 "shell",strcons(strlen(p->pw_shell),p->pw_shell),
		 NULL));}
Esempio n. 3
-1
LISP lstatfs(LISP path)
{long iflag;
 struct statfs s;
 iflag = no_interrupt(1);
 if (statfs(get_c_string(path),&s,sizeof(s)))
   return(err("statfs",llast_c_errmsg(-1)));
 no_interrupt(iflag);
 return(symalist("type",(((s.f_type >= 0) && (s.f_type < MNT_NUMTYPES) &&
			  mnt_names[s.f_type])
			 ? rintern(mnt_names[s.f_type])
			 : flocons(s.f_type)),
		 "bsize",flocons(s.f_bsize),
		 "blocks",flocons(s.f_blocks),
		 "bfree",flocons(s.f_bfree),
		 "bavail",flocons(s.f_bavail),
		 "files",flocons(s.f_files),
		 "ffree",flocons(s.f_ffree),
		 "mntonname",strcons(-1,s.f_mntonname),
		 "mntfromname",strcons(-1,s.f_mntfromname),
		 NULL));}