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

12

/system/core/toolbox/
H A Dmknod.c46 mode_t mode = 0660; local
59 mode |= S_IFBLK;
64 mode |= S_IFCHR;
68 mode |= S_IFIFO;
90 if (mknod(path, mode, makedev(major, minor))) {
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.c36 static char mode2kind(mode_t mode) argument
38 switch(mode & S_IFMT){
50 void strmode(mode_t mode, char *out) argument
52 *out++ = mode2kind(mode);
54 *out++ = (mode & 0400) ? 'r' : '-';
55 *out++ = (mode & 0200) ? 'w' : '-';
56 if(mode & 04000) {
57 *out++ = (mode & 0100) ? 's' : 'S';
59 *out++ = (mode & 0100) ? 'x' : '-';
61 *out++ = (mode
166 char mode[16]; local
240 char mode[16]; local
[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/extras/ext4_utils/
H A Dcontents.h27 u16 mode; member in struct:dentry
40 int inode_set_permissions(u32 inode_num, u16 mode, u16 uid, u16 gid, u32 mtime);
H A Dcanned_fs_config.c31 unsigned mode; member in struct:__anon247
60 p->mode = strtol(strtok(NULL, " "), NULL, 8); // mode is in octal
84 unsigned* uid, unsigned* gid, unsigned* mode, uint64_t* capabilities) {
94 *mode = p->mode;
106 if (c_mode != *mode) printf("%s mode 0%o 0%o\n", path, *mode, c_mode);
83 canned_fs_config(const char* path, int dir, unsigned* uid, unsigned* gid, unsigned* mode, uint64_t* capabilities) argument
H A Dcontents.c247 int inode_set_permissions(u32 inode_num, u16 mode, u16 uid, u16 gid, u32 mtime) argument
254 inode->i_mode |= mode;
/system/core/libcutils/
H A Dfs.c40 int fs_prepare_dir(const char* path, mode_t mode, uid_t uid, gid_t gid) { argument
57 if (((sb.st_mode & ALL_PERMS) == mode) && (sb.st_uid == uid) && (sb.st_gid == gid)) {
64 if (TEMP_FAILURE_RETRY(mkdir(path, mode)) == -1) {
72 if (TEMP_FAILURE_RETRY(chmod(path, mode)) == -1) {
73 ALOGE("Failed to chmod(%s, %d): %s", path, mode, strerror(errno));
153 int fs_mkdirs(const char* path, mode_t mode) { argument
186 if (mkdirat(fd, segment, mode) != 0) {
/system/core/adb/
H A Dfile_sync_service.h57 unsigned mode; member in struct:__anon6::__anon8
63 unsigned mode; member in struct:__anon6::__anon9
H A Dfile_sync_service.c53 unsigned int mode = 0775; local
63 fs_config(name, 1, &uid, &gid, &mode, &cap);
65 ret = adb_mkdir(name, mode);
91 msg.stat.mode = 0;
95 msg.stat.mode = htoll(st.st_mode);
133 msg.dent.mode = htoll(st.st_mode);
150 msg.dent.mode = 0;
180 gid_t gid, mode_t mode, char *buffer, bool do_unlink)
186 fd = adb_open_mode(path, O_WRONLY | O_CREAT | O_EXCL | O_CLOEXEC, mode);
193 fd = adb_open_mode(path, O_WRONLY | O_CREAT | O_EXCL | O_CLOEXEC, mode);
179 handle_send_file(int s, char *path, uid_t uid, gid_t gid, mode_t mode, char *buffer, bool do_unlink) argument
329 unsigned int mode; local
[all...]
H A Dservices.c100 snprintf(buf, sizeof(buf), "restarting in TCP mode port: %d\n", port);
110 snprintf(buf, sizeof(buf), "restarting in USB mode\n");
340 static int create_subproc_thread(const char *name, const subproc_mode mode) argument
354 switch (mode) {
362 fprintf(stderr, "invalid subproc_mode %d\n", mode);
H A Dfile_sync_client.c92 typedef void (*sync_ls_cb)(unsigned mode, unsigned size, unsigned time, const char *name, void *cookie);
122 func(ltohl(msg.dent.mode),
144 unsigned int *mode)
166 *mode = ltohl(msg.stat.mode);
187 unsigned int *mode, unsigned int *size)
198 *mode = ltohl(msg.stat.mode);
204 int sync_readmode(int fd, const char *path, unsigned *mode) argument
225 *mode
143 sync_readtime(int fd, const char *path, unsigned int *timestamp, unsigned int *mode) argument
186 sync_finish_readtime(int fd, unsigned int *timestamp, unsigned int *mode, unsigned int *size) argument
337 sync_send(int fd, const char *lpath, const char *rpath, unsigned mtime, mode_t mode, int show_progress) argument
543 do_sync_ls_cb(unsigned mode, unsigned size, unsigned time, const char *name, void *cookie) argument
573 unsigned int mode; member in struct:copyinfo
719 unsigned int timestamp, mode, size; local
757 unsigned mode; local
822 sync_ls_build_list_cb(unsigned mode, unsigned size, unsigned time, const char *name, void *cookie) argument
883 set_time_and_mode(const char *lpath, unsigned int time, unsigned int mode) argument
954 unsigned mode, time; local
[all...]
H A Dsysdeps.h107 static __inline__ int adb_mkdir(const char* path, int mode) argument
115 extern int adb_creat(const char* path, int mode);
143 static __inline__ int adb_open_mode(const char* path, int options, int mode) argument
156 int mode; local
159 mode = va_arg( args, int );
161 return open(path, options, mode);
335 int mode; local
338 mode = va_arg( args, int );
340 return TEMP_FAILURE_RETRY( open( path, options, mode ) );
344 static __inline__ int adb_open_mode( const char* pathname, int options, int mode )
405 adb_creat(const char* path, int mode) argument
489 adb_mkdir(const char* path, int mode) argument
[all...]
/system/core/libprocessgroup/
H A Dprocessgroup.cpp278 static int mkdirAndChown(const char *path, mode_t mode, uid_t uid, gid_t gid) argument
/system/vold/
H A DLoop.cpp142 mode_t mode = 0660 | S_IFBLK; local
144 if (mknod(filename, mode, dev) < 0) {
H A DVolume.cpp222 mode_t mode = 0660 | S_IFBLK; local
224 if (mknod(path, mode, dev) < 0) {
554 // TODO: determine failure mode if FUSE times out
/system/core/adf/libadfhwc/
H A Dadfhwc.cpp118 const drm_mode_modeinfo &mode, const uint32_t attribute)
122 if (mode.vrefresh)
123 return 1000000000 / mode.vrefresh;
127 return mode.hdisplay;
130 return mode.vdisplay;
133 return dpi(mode.hdisplay, data.width_mm);
136 return dpi(mode.vdisplay, data.height_mm);
117 adf_display_attribute(const adf_interface_data &data, const drm_mode_modeinfo &mode, const uint32_t attribute) argument
/system/core/cpio/
H A Dmkbootfs.c40 int uid, gid, mode; member in struct:fs_config_entry
46 * gid, mode). */
72 s->st_mode = p->mode | (s->st_mode & ~07777);
78 s->st_mode = empty_path_config->mode | (s->st_mode & ~07777);
100 // fprintf(stderr, "_eject %s: mode=0%o\n", out, s->st_mode);
267 die("Unknown '%s' (mode %d)?\n", in, s.st_mode);
312 cc->mode = strtol(strtok(NULL, " \n"), NULL, 8);
/system/core/toolbox/upstream-netbsd/usr.bin/grep/
H A Dgrep.h99 int mode; member in struct:epat
/system/media/audio_utils/
H A Dtinysndfile.c28 int mode; member in struct:SNDFILE_
71 handle->mode = SFM_READ;
304 handle->mode = SFM_WRITE;
313 SNDFILE *sf_open(const char *path, int mode, SF_INFO *info) argument
319 switch (mode) {
325 fprintf(stderr, "mode=%d\n", mode);
335 if (handle->mode == SFM_WRITE) {
353 if (handle == NULL || handle->mode != SFM_READ || ptr == NULL || !handle->remaining ||
398 if (handle == NULL || handle->mode !
[all...]
/system/core/include/private/
H A Dandroid_filesystem_config.h182 unsigned mode; member in struct:fs_path_config
273 unsigned *uid, unsigned *gid, unsigned *mode, uint64_t *capabilities)
300 *mode = (*mode & (~07777)) | pc->mode;
305 path, pc->prefix ? pc->prefix : "", *uid, *gid, *mode);
272 fs_config(const char *path, int dir, unsigned *uid, unsigned *gid, unsigned *mode, uint64_t *capabilities) argument
/system/core/init/
H A Dutil.c137 INFO("Created socket '%s' with mode '%o', user '%d', group '%d'\n",
283 int mkdir_recursive(const char *pathname, mode_t mode) argument
306 ret = make_dir(buf, mode);
311 ret = make_dir(pathname, mode);
505 int make_dir(const char *path, mode_t mode) argument
512 selabel_lookup(sehandle, &secontext, path, mode);
516 rc = mkdir(path, mode);
/system/core/liblog/
H A Dlog_read.c240 int mode; member in struct:logger_list
466 struct logger_list *android_logger_list_alloc(int mode, argument
478 logger_list->mode = mode;
488 struct logger_list *android_logger_list_alloc_time(int mode, argument
500 logger_list->mode = mode;
546 int mode,
550 struct logger_list *logger_list = android_logger_list_alloc(mode, tail, pid);
581 if (logger_list->mode
545 android_logger_list_open(log_id_t id, int mode, unsigned int tail, pid_t pid) argument
[all...]
H A Dlog_read_kern.c76 static int accessmode(int mode) argument
78 if ((mode & O_ACCMODE) == O_WRONLY) {
81 if ((mode & O_ACCMODE) == O_RDWR) {
88 static int check_allocate_accessible(char **n, const char *b, int mode) argument
101 return access(*n, accessmode(mode));
137 int mode; member in struct:logger_list
195 static int logger_ioctl(struct logger *logger, int cmd, int mode) argument
204 if (((mode & O_ACCMODE) == O_RDWR)
205 || (((mode ^ logger->top->mode)
290 android_logger_list_alloc(int mode, unsigned int tail, pid_t pid) argument
307 android_logger_list_alloc_time(int mode, log_time start __unused, pid_t pid) argument
369 android_logger_list_open(log_id_t id, int mode, unsigned int tail, pid_t pid) argument
[all...]
/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...]

Completed in 5632 milliseconds

12