Lines Matching defs:vfstab
44 #include <sys/vfstab.h>
417 * Description: This function digs into a BE's vfstab and updates all
428 * file systems to look for in vfstab.
462 /* Get string for vfstab in the mounted BE. */
463 (void) snprintf(alt_vfstab, sizeof (alt_vfstab), "%s/etc/vfstab",
466 /* Update the vfstab */
1609 * Description: This function updates a vfstab file to reflect the new
1613 * vfstab - vfstab file to modify
1620 * file systems to look for in vfstab.
1628 _update_vfstab(char *vfstab, char *be_name, char *old_rc_loc,
1631 struct vfstab vp;
1648 * Open vfstab for reading twice. First is for comments,
1651 if ((comments = fopen(vfstab, "r")) == NULL ||
1652 (vfs_ents = fopen(vfstab, "r")) == NULL) {
1655 "failed to open vfstab (%s): %s\n"), vfstab,
1661 /* Grab the stats of the original vfstab file */
1662 if (stat(vfstab, &sb) != 0) {
1665 "failed to stat file %s: %s\n"), vfstab,
1671 /* Create tmp file for modified vfstab */
1672 if ((tmp_vfstab = (char *)malloc(strlen(vfstab) + 7))
1679 tmp_vfstab_len = strlen(vfstab) + 7;
1681 (void) strlcpy(tmp_vfstab, vfstab, tmp_vfstab_len);
1707 * it through to the tmp vfstab.
1712 * Else line is a vfstab entry, grab it
1713 * into a vfstab struct.
1751 "field for vfstab entry "
1761 /* Put entry through to tmp vfstab */
1773 /* Copy tmp vfstab into place */
1774 if (rename(tmp_vfstab, vfstab) != 0) {
1778 vfstab, strerror(err));
1784 if (chmod(vfstab, sb.st_mode) != 0) {
1787 "failed to chmod %s: %s\n"), vfstab, strerror(err));
1791 if (chown(vfstab, sb.st_uid, sb.st_gid) != 0) {
1794 "failed to chown %s: %s\n"), vfstab, strerror(err));