Searched refs:mode (Results 1 - 25 of 39) sorted by relevance

12

/system/core/toolbox/
H A Dchmod.c13 void recurse_chmod(char* path, int mode) argument
37 if (chmod(subpath, mode) < 0) {
42 recurse_chmod(subpath, mode);
77 int mode = 0; local
81 mode = (mode<<3) | (*s-'0');
84 fprintf(stderr, "Bad mode\n");
91 if (chmod(argv[i], mode) < 0) {
96 recurse_chmod(argv[i], mode);
H A Dls.c37 static char mode2kind(unsigned mode) argument
39 switch(mode & S_IFMT){
51 static void mode2str(unsigned mode, char *out) argument
53 *out++ = mode2kind(mode);
55 *out++ = (mode & 0400) ? 'r' : '-';
56 *out++ = (mode & 0200) ? 'w' : '-';
57 if(mode & 04000) {
58 *out++ = (mode & 0100) ? 's' : 'S';
60 *out++ = (mode & 0100) ? 'x' : '-';
62 *out++ = (mode
170 char mode[16]; local
245 char mode[16]; local
[all...]
H A Dsetconsole.c37 int mode = -1; local
53 if(mode == KD_TEXT) {
57 mode = KD_GRAPHICS;
60 if(mode == KD_GRAPHICS) {
64 mode = KD_TEXT;
85 " -g Switch to graphics mode\n"
86 " -t Switch to text mode\n"
99 if(mode == -1 && new_vc == 0 && close_vc == 0 && switch_vc == -1 && printvc == 0) {
159 if (mode != -1) {
160 if (ioctl(fd, KDSETMODE, (void*)mode) <
[all...]
/system/extras/ext4_utils/
H A Dcontents.h27 u16 mode; member in struct:dentry
39 int inode_set_permissions(u32 inode_num, u16 mode, u16 uid, u16 gid, u32 mtime);
H A Dmake_ext4fs.h35 unsigned *mode);
H A Dext4fixup.c621 static int recurse_dir(int fd, struct ext4_inode *inode, char *dirbuf, int dirsize, int mode) argument
632 switch (mode) {
638 critical_error("recurse_dir() called witn unknown mode!\n");
680 if (((mode == SANITY_CHECK_PASS) || (mode == UPDATE_INODE_NUMS)) &&
711 is_dir = is_entry_dir(fd, dirp, mode);
713 ((mode == SANITY_CHECK_PASS) || (mode == MARK_INODE_NUMS) ||
714 ((mode == UPDATE_INODE_NUMS) && (dirp->inode & 0x80000000))) ) {
737 recurse_dir(fd, &tmp_inode, tmp_dirbuf, tmp_dirsize, mode);
[all...]
H A Dmake_ext4fs.c84 .mode = S_IRWXU,
92 inode_set_permissions(inode, dentries.mode,
156 dentries[i].mode = stat.st_mode & (S_ISUID|S_ISGID|S_ISVTX|S_IRWXU|S_IRWXG|S_IRWXO);
160 unsigned int mode = 0; local
164 fs_config_func(dentries[i].path, dir, &uid, &gid, &mode);
165 dentries[i].mode = mode;
221 dentries[0].mode = S_IRWXU;
229 if (selabel_lookup(sehnd, &dentries[0].secon, sepath, dentries[0].mode) < 0)
254 ret = inode_set_permissions(entry_inode, dentries[i].mode,
[all...]
/system/extras/tests/cpueater/
H A Ddaemonize.c33 int pid, fd, mode; local
46 mode = O_TRUNC;
64 mode = O_APPEND;
72 if(open(file, O_WRONLY|mode|O_CREAT, 0666) < 0) {
/system/core/adb/
H A Dfile_sync_service.c64 msg.stat.mode = 0;
68 msg.stat.mode = htoll(st.st_mode);
106 msg.dent.mode = htoll(st.st_mode);
122 msg.dent.mode = 0;
151 static int handle_send_file(int s, char *path, mode_t mode, char *buffer) argument
157 fd = adb_open_mode(path, O_WRONLY | O_CREAT | O_EXCL, mode);
160 fd = adb_open_mode(path, O_WRONLY | O_CREAT | O_EXCL, mode);
163 fd = adb_open_mode(path, O_WRONLY, mode);
279 mode_t mode; local
286 mode
[all...]
H A Dfile_sync_client.c75 typedef void (*sync_ls_cb)(unsigned mode, unsigned size, unsigned time, const char *name, void *cookie);
105 func(ltohl(msg.dent.mode),
168 unsigned int *mode, unsigned int *size)
179 *mode = ltohl(msg.stat.mode);
185 int sync_readmode(int fd, const char *path, unsigned *mode) argument
206 *mode = ltohl(msg.stat.mode);
298 unsigned mtime, mode_t mode, int verifyApk)
310 snprintf(tmp, sizeof(tmp), ",%d", mode);
167 sync_finish_readtime(int fd, unsigned int *timestamp, unsigned int *mode, unsigned int *size) argument
297 sync_send(int fd, const char *lpath, const char *rpath, unsigned mtime, mode_t mode, int verifyApk) argument
535 do_sync_ls_cb(unsigned mode, unsigned size, unsigned time, const char *name, void *cookie) argument
565 unsigned int mode; member in struct:copyinfo
708 unsigned int timestamp, mode, size; local
745 unsigned mode; local
810 sync_ls_build_list_cb(unsigned mode, unsigned size, unsigned time, const char *name, void *cookie) argument
945 unsigned mode; local
[all...]
H A Dsysdeps.h106 static __inline__ int adb_mkdir(const char* path, int mode) argument
114 extern int adb_creat(const char* path, int mode);
142 static __inline__ int adb_open_mode(const char* path, int options, int mode) argument
155 int mode; local
158 mode = va_arg( args, int );
160 return open(path, options, mode);
317 int mode; local
320 mode = va_arg( args, int );
322 return open(path, options, mode);
326 static __inline__ int adb_open_mode( const char* pathname, int options, int mode )
387 adb_creat(const char* path, int mode) argument
471 adb_mkdir(const char* path, int mode) argument
[all...]
H A Dfile_sync_service.h57 unsigned mode; member in struct:__anon274::__anon276
63 unsigned mode; member in struct:__anon274::__anon277
/system/core/init/
H A Dutil.h34 int mkdir_recursive(const char *pathname, mode_t mode);
42 int make_dir(const char *path, mode_t mode);
H A Dbuiltins.c114 static int _chmod(const char *path, mode_t mode) argument
124 ret = fchmod(fd, mode);
296 mode_t mode = 0755; local
299 /* mkdir <path> [mode] [owner] [group] */
302 mode = strtoul(args[2], 0, 8);
305 ret = make_dir(args[1], mode);
308 ret = _chmod(args[1], mode);
327 if (mode & (S_ISUID | S_ISGID)) {
328 ret = _chmod(args[1], mode);
409 int mode, loo local
732 mode_t mode = 0; local
745 mode_t mode = get_mode(args[1]); local
[all...]
H A Dutil.c136 INFO("Created socket '%s' with mode '%o', user '%d', group '%d'\n",
282 int mkdir_recursive(const char *pathname, mode_t mode) argument
305 ret = make_dir(buf, mode);
310 ret = make_dir(pathname, mode);
467 int make_dir(const char *path, mode_t mode) argument
475 selabel_lookup(sehandle, &secontext, path, mode);
480 rc = mkdir(path, mode);
/system/core/include/cutils/
H A Dfs.h42 * Ensure that directory exists with given mode and owners.
44 extern int fs_prepare_dir(const char* path, mode_t mode, uid_t uid, gid_t gid);
/system/core/libcutils/
H A Dfs.c33 int fs_prepare_dir(const char* path, mode_t mode, uid_t uid, gid_t gid) { argument
50 if (((sb.st_mode & ALL_PERMS) == mode) && (sb.st_uid == uid) && (sb.st_gid == gid)) {
57 if (TEMP_FAILURE_RETRY(mkdir(path, mode)) == -1) {
65 if (TEMP_FAILURE_RETRY(chmod(path, mode)) == -1) {
66 ALOGE("Failed to chmod(%s, %d): %s", path, mode, strerror(errno));
/system/extras/tests/fstest/
H A Dperm_checker.c200 static void print_new_rule(const char *name, mode_t mode, uid_t uid, gid_t gid) argument
206 printf("%s %4o %4o %s %d %s %d\n", name, mode, mode, pw->pw_name, uid,
211 static int pass_rule(const perm_rule_t *pr, mode_t mode, uid_t uid, gid_t gid) argument
213 if (((pr->min_mode & mode) == pr->min_mode) &&
214 ((pr->max_mode | mode) == pr->max_mode) &&
223 static int validate_file(const char *name, mode_t mode, uid_t uid, gid_t gid) argument
232 if (!pass_rule(pr, mode, uid, gid))
245 print_new_rule(name, mode, uid, gid);
255 if (!pass_rule(pr, mode, ui
284 validate_link(const char *name, mode_t mode, uid_t uid, gid_t gid) argument
312 validate_dir(const char *name, mode_t mode, uid_t uid, gid_t gid) argument
[all...]
/system/core/sh/
H A Djobs.c288 set_curjob(struct job *jp, int mode) argument
308 switch (mode) {
382 showjob(struct output *out, struct job *jp, int mode) argument
391 if (mode & SHOW_PGID) {
402 if (mode & SHOW_PID)
403 mode |= SHOW_MULTILINE;
405 if ((procno > 1 && !(mode & SHOW_MULTILINE))
406 || (mode & SHOW_SIGNALLED)) {
414 mode |= SHOW_MULTILINE;
415 if (st1 == -1 || !(mode
503 int mode, m; local
534 showjobs(struct output *out, int mode) argument
847 forkshell(struct job *jp, union node *n, int mode) argument
867 forkparent(struct job *jp, union node *n, int mode, pid_t pid) argument
896 forkchild(struct job *jp, union node *n, int mode, int vforked) argument
1094 int mode = 0; local
[all...]
H A Deval.c685 int mode; local
837 mode = cmd->ncmd.backgnd;
839 mode = FORK_NOJOB;
879 forkchild(jp, cmd, mode, vforked);
893 forkparent(jp, cmd, mode, pid);
899 if (forkshell(jp, cmd, mode) != 0)
979 mode = (cmdentry.u.bltin == execcmd) ? 0 : REDIR_PUSH;
984 mode |= REDIR_BACKQ;
1003 redirect(cmd->ncmd.redirect, mode);
1071 if (mode
[all...]
/system/core/include/private/
H A Dandroid_filesystem_config.h148 unsigned mode; member in struct:fs_path_config
232 unsigned *uid, unsigned *gid, unsigned *mode)
255 *mode = (*mode & (~07777)) | pc->mode;
259 path, pc->prefix ? pc->prefix : "", *uid, *gid, *mode);
231 fs_config(const char *path, int dir, unsigned *uid, unsigned *gid, unsigned *mode) argument
/system/core/sdcard/
H A Dfuse.h96 __u32 mode; member in struct:fuse_attr
154 * FUSE_DONT_MASK: don't apply umask to file mode on create operations
311 __u32 mode; member in struct:fuse_mknod_in
318 __u32 mode; member in struct:fuse_mkdir_in
342 __u32 mode; member in struct:fuse_setattr_in
356 __u32 mode; member in struct:fuse_create_in
H A Dsdcard.c285 attr->mode = s->st_mode;
292 if (attr->mode & 0100) {
293 attr->mode = (attr->mode & (~0777)) | 0775;
295 attr->mode = (attr->mode & (~0777)) | 0664;
641 name, req->mode, hdr->nodeid, parent_node ? parent_node->name : "?");
648 __u32 mode = (req->mode & (~0777)) | 0664; local
649 if (mknod(child_path, mode, re
674 __u32 mode = (req->mode & (~0777)) | 0775; local
[all...]
/system/core/toolbox/grep/
H A Dgrep.c111 bool qflag; /* -q: quiet mode (don't output anything) */
112 bool sflag; /* -s: silent mode (ignore errors) */
250 add_fpattern(const char *pat, int mode) argument
260 fpattern[fpatterns].mode = mode;
268 add_dpattern(const char *pat, int mode) argument
278 dpattern[dpatterns].mode = mode;
/system/core/cpio/
H A Dmkbootfs.c40 int uid, gid, mode; member in struct:fs_config_entry
46 * gid, mode). */
71 s->st_mode = p->mode | (s->st_mode & ~07777);
77 s->st_mode = empty_path_config->mode | (s->st_mode & ~07777);
98 // fprintf(stderr, "_eject %s: mode=0%o\n", out, s->st_mode);
263 die("Unknown '%s' (mode %d)?\n", in, s.st_mode);
308 cc->mode = strtol(strtok(NULL, " \n"), NULL, 8);

Completed in 4295 milliseconds

12