Searched defs:mode (Results 1 - 25 of 34) sorted by relevance

12

/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/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 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...]
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...]
/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 Dcontents.c236 int inode_set_permissions(u32 inode_num, u16 mode, u16 uid, u16 gid, u32 mtime) argument
243 inode->i_mode |= mode;
H A Dmake_ext4fs.c84 .mode = S_IRWXU,
92 inode_set_permissions(inode, dentries.mode,
144 dentries[i].mode = stat.st_mode & (S_ISUID|S_ISGID|S_ISVTX|S_IRWXU|S_IRWXG|S_IRWXO);
148 unsigned int mode = 0; local
152 fs_config_func(dentries[i].path, dir, &uid, &gid, &mode);
153 dentries[i].mode = mode;
214 ret = inode_set_permissions(entry_inode, dentries[i].mode,
/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/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_service.h57 unsigned mode; member in struct:__anon274::__anon276
63 unsigned mode; member in struct:__anon274::__anon277
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...]
/system/vold/
H A DLoop.cpp142 mode_t mode = 0660 | S_IFBLK; local
144 if (mknod(filename, mode, dev) < 0) {
H A DVolume.cpp200 mode_t mode = 0660 | S_IFBLK; local
202 if (mknod(path, mode, dev) < 0) {
521 if (mount("tmpfs", SEC_STG_SECIMGDIR, "tmpfs", MS_RDONLY, "size=0,mode=000,uid=0,gid=0")) {
663 if (mount("tmpfs", SEC_STG_SECIMGDIR, "tmpfs", MS_RDONLY, "size=0,mode=0,uid=0,gid=0")) {
/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);
/system/core/toolbox/grep/
H A Dgrep.h103 int mode; member in struct:epat
/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/init/
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);
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 Ddevices.c194 mode_t mode; local
200 mode = get_device_perm(path, &uid, &gid) | (block ? S_IFBLK : S_IFCHR);
203 selabel_lookup(sehandle, &secontext, path, mode);
214 mknod(path, mode, dev);
/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/bluetooth/bluez-clean-headers/bluetooth/
H A Dl2cap.h41 uint8_t mode; member in struct:l2cap_options
/system/core/libpixelflinger/
H A Dpixelflinger.cpp197 static void ggl_shadeModel(void* con, GGLenum mode) argument
200 switch (mode) {
/system/core/logcat/
H A Dlogcat.cpp463 int mode = O_RDONLY; local
498 mode = O_WRONLY;
665 (mode & O_RDONLY) ? R_OK : 0
666 | (mode & O_WRONLY) ? W_OK : 0;
732 dev->fd = open(dev->device, mode);
/system/core/sh/
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...]

Completed in 207 milliseconds

12