Home
last modified time | relevance | path

Searched refs:sb (Results 1 – 25 of 32) sorted by relevance

12

/busybox-1.35.0/e2fsprogs/
Dtune2fs.c54 struct ext2_super_block *sb; in tune2fs_main() local
65 sb = xzalloc(1024); in tune2fs_main()
66 xread(fd, sb, 1024); in tune2fs_main()
73 STORE_LE(sb->s_mnt_count, (unsigned)n); in tune2fs_main()
78 safe_strncpy((char *)sb->s_volume_name, label, sizeof(sb->s_volume_name)); in tune2fs_main()
84 STORE_LE(sb->s_max_mnt_count, (unsigned)n); in tune2fs_main()
89 STORE_LE(sb->s_checkinterval, n); in tune2fs_main()
94 xwrite(fd, sb, 1024); in tune2fs_main()
97 free(sb); in tune2fs_main()
/busybox-1.35.0/util-linux/volume_id/
Dsquashfs.c34 struct squashfs_superblock *sb; in volume_id_probe_squashfs() local
37 sb = volume_id_get_buffer(id, off, 0x200); in volume_id_probe_squashfs()
38 if (!sb) in volume_id_probe_squashfs()
48 if (sb->magic == SIG1 in volume_id_probe_squashfs()
49 || sb->magic == SIG2 in volume_id_probe_squashfs()
50 || sb->magic == SIG3 in volume_id_probe_squashfs()
51 || sb->magic == SIG4 in volume_id_probe_squashfs()
Derofs.c47 struct erofs_super_block *sb; in volume_id_probe_erofs() local
52 sb = volume_id_get_buffer(id, EROFS_SUPER_OFFSET, sizeof(*sb)); in volume_id_probe_erofs()
53 if (!sb) in volume_id_probe_erofs()
56 if (sb->magic != cpu_to_le32(EROFS_SUPER_MAGIC_V1)) in volume_id_probe_erofs()
61 volume_id_set_label_string(id, sb->volume_name, in volume_id_probe_erofs()
62 MIN(sizeof(sb->volume_name), VOLUME_ID_LABEL_SIZE)); in volume_id_probe_erofs()
64 volume_id_set_uuid(id, sb->uuid, UUID_DCE); in volume_id_probe_erofs()
Df2fs.c68 struct f2fs_super_block *sb; in volume_id_probe_f2fs() local
72 sb = volume_id_get_buffer(id, F2FS_SB1_OFFSET, sizeof(*sb)); in volume_id_probe_f2fs()
74 if (!sb) in volume_id_probe_f2fs()
77 if (sb->magic != cpu_to_le32(F2FS_MAGIC)) in volume_id_probe_f2fs()
83 if (sb->major_ver == cpu_to_le16(1) && sb->minor_ver == cpu_to_le16(0)) in volume_id_probe_f2fs()
86 volume_id_set_label_unicode16(id, (uint8_t *)sb->volume_name, in volume_id_probe_f2fs()
89 volume_id_set_uuid(id, sb->uuid, UUID_DCE); in volume_id_probe_f2fs()
Dexfat.c77 struct exfat_super_block *sb; in volume_id_probe_exfat() local
87 sb = volume_id_get_buffer(id, EXFAT_SB_OFFSET, sizeof(*sb)); in volume_id_probe_exfat()
89 if (!sb) in volume_id_probe_exfat()
92 if (memcmp(sb->fs_name, "EXFAT ", 8) != 0) in volume_id_probe_exfat()
95 sector_sz = 1 << sb->bytes_per_sector; in volume_id_probe_exfat()
96 cluster_sz = sector_sz << sb->sectors_per_cluster; in volume_id_probe_exfat()
100 (le32_to_cpu(sb->cluster_heap_offset)) * sector_sz + in volume_id_probe_exfat()
101 (le32_to_cpu(sb->root_dir) - 2) * cluster_sz; in volume_id_probe_exfat()
107 volume_id_set_uuid(id, sb->vol_serial_nr, UUID_DOS); in volume_id_probe_exfat()
Dbcache.c91 struct bcache_super_block *sb; in volume_id_probe_bcache() local
93 sb = volume_id_get_buffer(id, BCACHE_SB_OFF, sizeof(*sb)); in volume_id_probe_bcache()
94 if (sb == NULL) in volume_id_probe_bcache()
97 if (memcmp(sb->magic, BCACHE_SB_MAGIC, BCACHE_SB_MAGIC_LEN) != 0) in volume_id_probe_bcache()
100 volume_id_set_label_string(id, sb->label, SB_LABEL_SIZE); in volume_id_probe_bcache()
101 volume_id_set_uuid(id, sb->uuid, UUID_DCE); in volume_id_probe_bcache()
Dnilfs.c89 struct nilfs2_super_block *sb; in volume_id_probe_nilfs() local
94 sb = volume_id_get_buffer(id, NILFS_SB1_OFFSET, sizeof(*sb)); in volume_id_probe_nilfs()
96 if (sb == NULL) in volume_id_probe_nilfs()
99 if (sb->s_magic != NILFS_MAGIC) in volume_id_probe_nilfs()
105 volume_id_set_label_string(id, sb->s_volume_name, NILFS_LABEL_SIZE < VOLUME_ID_LABEL_SIZE ? in volume_id_probe_nilfs()
107 volume_id_set_uuid(id, sb->s_uuid, UUID_DCE); in volume_id_probe_nilfs()
109 if (sb->s_rev_level == 2) in volume_id_probe_nilfs()
Dlfs.c47 struct lfs_super_block *sb; in volume_id_probe_lfs() local
51 sb = volume_id_get_buffer(id, LFS_SB1_OFFSET, sizeof(*sb)); in volume_id_probe_lfs()
53 if (!sb) in volume_id_probe_lfs()
56 if (memcmp(sb->magic, LFS_MAGIC_NAME, LFS_MAGIC_LEN) != 0) in volume_id_probe_lfs()
Dbtrfs.c93 struct btrfs_super_block *sb; in volume_id_probe_btrfs() local
100 sb = volume_id_get_buffer(id, off, sizeof(*sb)); in volume_id_probe_btrfs()
101 if (sb == NULL) in volume_id_probe_btrfs()
104 if (memcmp(sb->magic, BTRFS_MAGIC, 8) != 0) in volume_id_probe_btrfs()
109 volume_id_set_label_string(id, sb->label, VOLUME_ID_LABEL_SIZE); in volume_id_probe_btrfs()
110 volume_id_set_uuid(id, sb->fsid, UUID_DCE); in volume_id_probe_btrfs()
Dubifs.c108 struct ubifs_sb_node *sb; in volume_id_probe_ubifs() local
111 sb = volume_id_get_buffer(id, off, sizeof(struct ubifs_sb_node)); in volume_id_probe_ubifs()
112 if (!sb) in volume_id_probe_ubifs()
115 if (le32_to_cpu(sb->ch.magic) != UBIFS_NODE_MAGIC) in volume_id_probe_ubifs()
119 volume_id_set_uuid(id, sb->uuid, UUID_DCE); in volume_id_probe_ubifs()
/busybox-1.35.0/util-linux/
Dmkfs_reiser.c160 struct reiserfs_super_block *sb; in mkfs_reiser_main() local
210 sb = (struct reiserfs_super_block *)xzalloc(blocksize); in mkfs_reiser_main()
212 STORE_LE(sb->sb_block_count, blocks); in mkfs_reiser_main()
213 STORE_LE(sb->sb_free_blocks, blocks - i); in mkfs_reiser_main()
215 STORE_LE(sb->sb_root_block, block); in mkfs_reiser_main()
217 jp = &sb->sb_journal; in mkfs_reiser_main()
227 STORE_LE(sb->sb_blocksize, blocksize); in mkfs_reiser_main()
228 STORE_LE(sb->sb_oid_maxsize, (blocksize - sizeof(*sb)) / sizeof(uint32_t) / 2 * 2); in mkfs_reiser_main()
229 STORE_LE(sb->sb_oid_cursize, 2); // "." and ".." in mkfs_reiser_main()
230 strcpy(sb->s_magic, REISERFS_3_6_SUPER_MAGIC_STRING); in mkfs_reiser_main()
[all …]
Dmkfs_ext2.c241 struct ext2_super_block *sb; // superblock in mkfs_ext2_main() local
476 sb = xzalloc(1024); in mkfs_ext2_main()
477 STORE_LE(sb->s_rev_level, EXT2_DYNAMIC_REV); // revision 1 filesystem in mkfs_ext2_main()
478 STORE_LE(sb->s_magic, EXT2_SUPER_MAGIC); in mkfs_ext2_main()
479 STORE_LE(sb->s_inode_size, inodesize); in mkfs_ext2_main()
482 STORE_LE(sb->s_min_extra_isize, 0x001c); in mkfs_ext2_main()
483 STORE_LE(sb->s_want_extra_isize, 0x001c); in mkfs_ext2_main()
485 STORE_LE(sb->s_first_ino, EXT2_GOOD_OLD_FIRST_INO); in mkfs_ext2_main()
486 STORE_LE(sb->s_log_block_size, blocksize_log2 - EXT2_MIN_BLOCK_LOG_SIZE); in mkfs_ext2_main()
487 STORE_LE(sb->s_log_frag_size, blocksize_log2 - EXT2_MIN_BLOCK_LOG_SIZE); in mkfs_ext2_main()
[all …]
Dmesg.c50 struct stat sb; in mesg_main() local
70 xfstat(STDIN_FILENO, &sb, "stdin"); in mesg_main()
72 puts((sb.st_mode & (S_IWGRP|S_IWOTH)) ? "is y" : "is n"); in mesg_main()
75 m = (c == 'y') ? sb.st_mode | S_IWGRP_OR_S_IWOTH in mesg_main()
76 : sb.st_mode & ~(S_IWGRP|S_IWOTH); in mesg_main()
/busybox-1.35.0/procps/
Dsmemcap.c29 static void writeheader(const char *path, struct stat *sb, int type) in writeheader() argument
35 sprintf(header.mode, "%o", sb->st_mode & 0777); in writeheader()
37 sprintf(header.uid, "%o", sb->st_uid & 07777777); in writeheader()
38 sprintf(header.gid, "%o", sb->st_gid & 07777777); in writeheader()
39 sprintf(header.size, "%o", (unsigned)sb->st_size); in writeheader()
40 sprintf(header.mtime, "%llo", sb->st_mtime & 077777777777LL); in writeheader()
/busybox-1.35.0/coreutils/
Dshred.c68 struct stat sb; in shred_main() local
85 if (fstat(fd, &sb) == 0 && sb.st_size > 0) { in shred_main()
86 off_t size = sb.st_size; in shred_main()
/busybox-1.35.0/loginutils/
Dadd-remove-shell.c54 struct stat sb; in add_remove_shell_main() local
56 sb.st_mode = 0666; in add_remove_shell_main()
65 xfstat(fileno(orig_fp), &sb, orig_fn); in add_remove_shell_main()
77 xmove_fd(xopen3(new_fn, O_WRONLY | O_CREAT | O_TRUNC, sb.st_mode), STDOUT_FILENO); in add_remove_shell_main()
/busybox-1.35.0/libbb/
Dpidfile.c21 struct stat sb; in write_pidfile() local
31 wrote_pidfile = (fstat(pid_fd, &sb) == 0) && S_ISREG(sb.st_mode); in write_pidfile()
Dupdate_passwd.c94 struct stat sb; in update_passwd() local
151 if (fstat(old_fd, &sb) == 0) { in update_passwd()
152 fchmod(new_fd, sb.st_mode & 0777); /* ignore errors */ in update_passwd()
153 fchown(new_fd, sb.st_uid, sb.st_gid); in update_passwd()
Dprocps.c353 struct stat sb; in procps_scan() local
354 if (stat(filename, &sb)) in procps_scan()
357 sp->uid = sb.st_uid; in procps_scan()
358 sp->gid = sb.st_gid; in procps_scan()
/busybox-1.35.0/selinux/
Dsetfiles.c191 struct stat sb; in add_exclude() local
197 if (lstat(directory, &sb)) { in add_exclude()
201 if ((sb.st_mode & S_IFDIR) == 0) { in add_exclude()
203 directory, sb.st_mode); in add_exclude()
233 static int match(const char *name, struct stat *sb, char **con) in match() argument
242 ret = lstat(name, sb); in match()
253 if (S_ISLNK(sb->st_mode)) { in match()
315 return matchpathcon_index("/", sb->st_mode, con); in match()
316 return matchpathcon_index(name, sb->st_mode, con); in match()
468 struct stat *sb) in apply_spec() argument
[all …]
/busybox-1.35.0/include/
Dbb_e2fs_defs.h39 #define EXT2_SB(sb) (sb) argument
350 #define test_opt(sb, opt) (EXT2_SB(sb)->s_mount_opt & \ argument
490 #define EXT2_HAS_COMPAT_FEATURE(sb,mask) \ argument
491 ( EXT2_SB(sb)->s_feature_compat & (mask) )
492 #define EXT2_HAS_RO_COMPAT_FEATURE(sb,mask) \ argument
493 ( EXT2_SB(sb)->s_feature_ro_compat & (mask) )
494 #define EXT2_HAS_INCOMPAT_FEATURE(sb,mask) \ argument
495 ( EXT2_SB(sb)->s_feature_incompat & (mask) )
/busybox-1.35.0/networking/
Dhttpd_indexcgi.c253 struct stat sb; in main() local
260 if (stat(dp->d_name, &sb) != 0) in main()
264 dir_list[dir_list_count].dl_mode = sb.st_mode; in main()
265 dir_list[dir_list_count].dl_size = sb.st_size; in main()
266 dir_list[dir_list_count].dl_mtime = sb.st_mtime; in main()
/busybox-1.35.0/miscutils/
Dman.c97 struct stat sb; in run_pipe() local
105 xstat(man_filename, &sb); in run_pipe()
106 if (sb.st_size > 300) /* err on the safe side */ in run_pipe()
/busybox-1.35.0/debianutils/
Dstart_stop_daemon.c248 struct stat sb; in pid_is_user() local
252 if (stat(buf, &sb) != 0) in pid_is_user()
254 return (sb.st_uid == (uid_t)user_id); in pid_is_user()
/busybox-1.35.0/archival/libarchive/bz/
Dblocksort.c883 unsigned sb; in mainSort() local
884 sb = (ss << 8) + j; in mainSort()
885 if (!(ftab[sb] & SETMASK)) { in mainSort()
886 int32_t lo = ftab[sb] /*& CLEARMASK (redundant)*/; in mainSort()
887 int32_t hi = (ftab[sb+1] & CLEARMASK) - 1; in mainSort()
893 ftab[sb] |= SETMASK; in mainSort()

12