GETFSENT(3) Library Functions Manual GETFSENT(3)NAME
getfsent, getfsspec, getfsfile, getfstype, setfsent, endfsent - get file system descriptor file entry
SYNOPSIS
#include <fstab.h>
struct fstab *getfsent()
struct fstab *getfsspec(spec)
char *spec;
struct fstab *getfsfile(file)
char *file;
struct fstab *getfstype(type)
char *type;
int setfsent()
int endfsent()
DESCRIPTION
Getfsent, getfsspec, getfstype, and getfsfile each return a pointer to an object with the following structure containing the broken-out
fields of a line in the file system description file, <fstab.h>.
struct fstab {
char *fs_spec;
char *fs_file;
char *fs_type;
int fs_freq;
int fs_passno;
};
The fields have meanings described in fstab(5).
Getfsent reads the next line of the file, opening the file if necessary.
Setfsent opens and rewinds the file.
Endfsent closes the file.
Getfsspec and getfsfile sequentially search from the beginning of the file until a matching special file name or file system file name is
found, or until EOF is encountered. Getfstype does likewise, matching on the file system type field.
FILES
/etc/fstab
SEE ALSO fstab(5)DIAGNOSTICS
Null pointer (0) returned on EOF or error.
BUGS
All information is contained in a static area so it must be copied if it is to be saved.
4th Berkeley Distribution May 12, 1986 GETFSENT(3)
Check Out this Related Man Page
GETFSENT(3) BSD Library Functions Manual GETFSENT(3)NAME
getfsent, getfsspec, getfsfile, setfsent, endfsent -- get file system descriptor file entry
LIBRARY
Standard C Library (libc, -lc)
SYNOPSIS
#include <fstab.h>
struct fstab *
getfsent(void);
struct fstab *
getfsspec(const char *spec);
struct fstab *
getfsfile(const char *file);
int
setfsent(void);
void
endfsent(void);
DESCRIPTION
The getfsent(), getfsspec(), and getfsfile() functions each return a pointer to an object with the following structure containing the broken-
out fields of a line in the file system description file, <fstab.h>.
struct fstab {
char *fs_spec; /* block special device name */
char *fs_file; /* file system path prefix */
char *fs_vfstype; /* type of file system */
char *fs_mntops; /* comma separated mount options */
char *fs_type; /* rw, ro, sw, or xx */
int fs_freq; /* dump frequency, in days */
int fs_passno; /* pass number on parallel dump */
};
The fields have meanings described in fstab(5).
The setfsent() function opens the file (closing any previously opened file) or rewinds it if it is already open.
The endfsent() function closes the file.
The getfsspec() and getfsfile() functions search the entire file (opening it if necessary) for a matching special file name or file system
file name.
For programs wishing to read the entire database, getfsent() reads the next entry (opening the file if necessary).
All entries in the file with a type field equivalent to FSTAB_XX are ignored.
RETURN VALUES
The getfsent(), getfsspec(), and getfsfile() functions return a null pointer (0) on EOF or error. The setfsent() function returns 0 on fail-
ure, 1 on success. The endfsent() function returns nothing.
FILES
/etc/fstab
SEE ALSO fstab(5)HISTORY
The getfsent() function appeared in 4.0BSD; the endfsent(), getfsfile(), getfsspec(), and setfsent() functions appeared in 4.3BSD.
BUGS
These functions use static data storage; if the data is needed for future use, it should be copied before any subsequent calls overwrite it.
BSD June 4, 1993 BSD
I've created a new drive and i've added it to my fstab file but on startup it will not mount. here is how i put it into my fstab file, is that right?
/dev/hdb2 /disk2a ext3 defaults 1 2 (6 Replies)
Folks;
Please be patient with this issue when you read it. I know it's a little tricky.
I have a new share created on my SUSE 10 box. I'm trying to edit the /etc/fstab file or find a way to make this share needs no authentication.
The reason for that is we're using an outside application to... (3 Replies)
I was making text file copies of some system utility output (e.g. ioscan) and happened to look at /etc/fstab and found this:
/dev/vg02/lvol1 /prodbkup vxfs ioerror=mwdisable,log,nodatainlog,dev=40
020001 0 0
my other entries look like this:
/dev/vg04/lvol1 /trainbkup vxfs... (4 Replies)
Dear List,
While I was adding second hard disk to my system, I changed the /etc/fstab file by adding the following line:
/mnt/sdb1 /dev/sdb1 ext3 default 2 1
Now system does not boot and gives the following error:
Checking filesystems
/: Clean, 309260/18495840 files, 1064776/18486790... (2 Replies)
Hi,
I comment out some vol group in fstab accidentally.
I also comment the swap space in /etc/fstab
But I cannot edit /remove it back by using vi /etc/fstab again in init 1 and init 6 .
The file system /etc/fstab is read -only . I cannot chmod .....
What can I do in order to recover it ... (2 Replies)
hi
does any one know how i can:
the directory wood should contain a copy of the file /etc/fstab on the server, renamed as saw
i have tried cp /etc/fstab wood
but not sure how to rename it at the same time
any help would be greatly appreciated (3 Replies)
hi ,
i'm creating a shell script using fstab for my project of last year, i wonder you can help me to know what is the command allow me to get the list of unmounted partitions.
thanks (4 Replies)
I need as script (awk/sed?) to add noatime option to fstab.
It should append ,noatime to whatever is in column 4 if noatime isn't already there, leaving comments alone.
input:
# /etc/fstab
# Created by anaconda on Mon Oct 31 20:44:41 2011
#
# Accessible filesystems, by reference, are... (5 Replies)
Hi,
can someone kindly look into my copy script and figure out why am i getting a "unexpected EOF while looking for matching `"' error message
#!/bin/ksh -x
cd /home/goldenga/test/flag37
if ; then
rm copied.ok
cd /home/goldenga/test
Upper=`ls -t|grep 'qw*'|cut -d "w" -f 2|head... (4 Replies)
Hi Folks!
I accidentally overwrote in /etc/fstab file. Can you guys please tell me, what impact it would have created, when I restarted the machine(RHEL6).
I executed this command :
# blkid /dev/vda5 > /etc/fstab (17 Replies)
Hi,
I patched my RHEL 5.8 using yum update and then followed by updating vmware tools on my Virtual machine ( hosted on Vpshere), This is Oracle Database server.
After this when i rebooted - I saw may failed in the console.....with read only filesystem...........cat /etc/fstab was... (2 Replies)
Greetings!
Got another basic question for the community :)
After wiping a drive with dd, and calling mkfs.ext4 to set things up again, fstab seems to need to be refreshed somehow to allow a call to mount for the volume.
What might the "secret handshake" be to pull this off without first... (6 Replies)
once again, mounting another volume or hdd the fstab-file is giving me a headache. May someone could give me a hint how to configure the fstab-file properly to use the hdd.
The following
ls -l /dev/disk/by-uuidis giving me this
Thats the UUID for /dev/sdb1 with the name "save"... (6 Replies)
Hi,
Can anyone explain why we use defaults 0 0 in fstab and what does 0 inidicate
10.250.104.50:/home/u /home/u nfs defaults 0 0
Thanks in advance
Muzaffar (3 Replies)
Hi,
I am looking to replace value (fifth and sixth ) column to "0 0" in /etc/fstab file by scripting.
can any one please help me.
/dev/VolGroup00/tmp /tmp ext3 defaults 1 1 (2 Replies)