Lines Matching refs:file

4  * The contents of this file are subject to the terms of the
6 * You may not use this file except in compliance with the License.
14 * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
49 #include <sys/file.h>
212 char **file;
216 for (file = dm->dmap_devarray; *file != NULL; file++) {
217 if ((status = access(*file, F_OK)) == -1) {
218 dprintf("Unable to access file %s\n", *file);
288 char **file;
293 file = dm->dmap_devarray;
294 if (file != NULL) {
295 for (; *file != NULL; file++)
296 (void) printf(" %s", *file);
592 * Set the DAC characteristics of the file.
597 _newdac(char *file, uid_t owner, gid_t group, o_mode_t mode)
602 if (chown(file, owner, group) == -1) {
607 if (chown(file, owner, group) == -1) {
611 } while (fdetach(file) == 0);
616 if (strncmp(file, "/dev/", strlen("/dev/")) != 0) {
620 if (chmod(file, mode) == -1) {
625 err = acl_strip(file, owner, group, (mode_t)mode);
642 lock_dev(char *file, struct stat *statbuf)
655 lockfile = file;
659 dprintf("locking %s\n", file);
666 dperror("lock_dev: cannot open lock file");
672 dperror("lock_dev: cannot position lock file");
700 char **file;
704 file = list->dmap_devarray;
705 if (file == NULL)
707 for (; *file != NULL; file++) {
708 dprintf("Allocating %s\n", *file);
709 if ((error = _newdac(*file, uid, gid, mode)) != 0) {
710 (void) _newdac(*file, ALLOC_ERRID, DA_GID,
735 * mk_revoke() is used instead of system("/usr/sbin/fuser -k file")
736 * because "/usr/sbin/fuser -k file" kills all processes
737 * working with the file, even "vold" (bug #4095152).
740 mk_revoke(int optflag, char *file)
763 dprintf("first exec fuser %s\n", file);
764 (void) execl("/usr/sbin/fuser", "fuser", file, NULL);
792 dprintf("second exec fuser %s\n", file);
793 (void) execl("/usr/sbin/fuser", "fuser", file, NULL);
850 char **file;
853 file = list->dmap_devarray;
854 if (file == NULL)
856 for (; *file != NULL; file++) {
857 dprintf("Deallocating %s\n", *file);
858 if (mk_revoke(optflag, *file) < 0) {
859 dprintf("mk_unalloc: unable to revoke %s\n", *file);
863 status = _newdac(*file, DA_UID, DA_GID, DEALLOC_MODE);
876 char **file;
879 file = list->dmap_devarray;
880 if (file == NULL)
882 for (; *file != NULL; file++) {
883 dprintf("Putting %s in error state\n", *file);
884 status = _newdac(*file, ALLOC_ERRID, DA_GID, ALLOC_ERR_MODE);
1700 char **file;
1704 file = list->dmap_devarray;
1705 if (file == NULL)
1721 for (; *file != NULL; file++) {
1725 tmpfile = strdup(*file);
1759 *file);
1788 char **file;
1792 file = dm->dmap_devarray;
1793 if (file == NULL)
1803 * file in /dev, not the symlinks.
1811 for (; *file != NULL; file++) {
1823 devrelpath = strchr(*file + 1, '/');
1826 dprintf("Failed exclude %s in dev profile\n", *file);