Lines Matching defs:vfstab

45 #include <sys/vfstab.h>
2142 * Description: This function digs into a BE's vfstab and updates all
2153 * file systems to look for in vfstab.
2185 /* Get string for vfstab in the mounted BE. */
2186 (void) snprintf(alt_vfstab, sizeof (alt_vfstab), "%s/etc/vfstab",
2189 /* Update the vfstab */
2214 * Description: This function digs into a zone BE's vfstab and updates all
2226 * file systems to look for in vfstab.
2266 /* Get string from vfstab in the mounted zone BE */
2267 (void) snprintf(alt_vfstab, sizeof (alt_vfstab), "%s/etc/vfstab",
2270 /* Update the vfstab */
3415 * Description: This function updates a vfstab file to reflect the new
3419 * vfstab - vfstab file to modify
3426 * file systems to look for in vfstab.
3434 _update_vfstab(char *vfstab, char *be_name, char *old_rc_loc,
3437 struct vfstab vp;
3454 * Open vfstab for reading twice. First is for comments,
3457 if ((comments = fopen(vfstab, "r")) == NULL ||
3458 (vfs_ents = fopen(vfstab, "r")) == NULL) {
3461 "failed to open vfstab (%s): %s\n"), vfstab,
3467 /* Grab the stats of the original vfstab file */
3468 if (stat(vfstab, &sb) != 0) {
3471 "failed to stat file %s: %s\n"), vfstab,
3477 /* Create tmp file for modified vfstab */
3478 if ((tmp_vfstab = (char *)malloc(strlen(vfstab) + 7))
3485 tmp_vfstab_len = strlen(vfstab) + 7;
3487 (void) strlcpy(tmp_vfstab, vfstab, tmp_vfstab_len);
3513 * it through to the tmp vfstab.
3518 * Else line is a vfstab entry, grab it
3519 * into a vfstab struct.
3557 "field for vfstab entry "
3567 /* Put entry through to tmp vfstab */
3579 /* Copy tmp vfstab into place */
3580 if (rename(tmp_vfstab, vfstab) != 0) {
3584 vfstab, strerror(err));
3590 if (chmod(vfstab, sb.st_mode) != 0) {
3593 "failed to chmod %s: %s\n"), vfstab, strerror(err));
3597 if (chown(vfstab, sb.st_uid, sb.st_gid) != 0) {
3600 "failed to chown %s: %s\n"), vfstab, strerror(err));