/illumos-gate/usr/src/cmd/ndmpd/tlm/ |
H A D | tlm_bitmap.c | 319 bmp_set(bmap_chunk_t *cp, u_quad_t bn, uint_t *vp) in bmp_set() argument 326 bn -= cp->c_off; in bmp_set() 327 if (bn < cp->c_clen) { in bmp_set() 328 mask = 1 <<(bn & BMAP_BPW_MASK); in bmp_set() 329 ip = &cp->c_bmp[bn >> BMAP_BPW_SHIFT]; in bmp_set() 330 v = (*vp <<(bn & BMAP_BPW_MASK)) & mask; in bmp_set() 346 bmp_get(bmap_chunk_t *cp, u_quad_t bn) in bmp_get() argument 351 bn -= cp->c_off; in bmp_get() 352 if (bn < cp->c_clen) { in bmp_get() 353 bit = 1 <<(bn & BMAP_BPW_MASK); in bmp_get() [all …]
|
/illumos-gate/usr/src/lib/libvolmgt/common/ |
H A D | volmgt_on_private.c | 138 char *bn = NULL; /* block name */ in _dev_unmount() local 150 if ((bn = (char *)volmgt_getfullblkname(path)) == NULL) { in _dev_unmount() 157 absname = bn; in _dev_unmount() 158 if (realpath(bn, pathbuf) != NULL) in _dev_unmount() 162 (!volmgt_ownspath(absname) && volmgt_symname(bn) == NULL); in _dev_unmount() 172 if (strncmp(bn, vr, strlen(vr)) == 0) { in _dev_unmount() 178 media_info_gotten = get_media_info(bn, &mtype, &mnum, &spcl); in _dev_unmount() 181 mnum, spcl, bn); in _dev_unmount() 187 if (get_media_info(bn, &mtype, &mnum, &spcl)) { in _dev_unmount() 213 mtype, mnum, spcl, bn); in _dev_unmount() [all …]
|
/illumos-gate/usr/src/cmd/ndmpd/include/ |
H A D | bitmap.h | 152 #define bm_setone(bmd, bn) bm_set((bmd), (bn), 1, 1) argument 153 #define dbm_setone(bmd, bn) dbm_set((bmd), (bn), 1, 1) argument 154 #define bm_unsetone(bmd, bn) bm_set((bmd), (bn), 1, 0) argument 155 #define dbm_unsetone(bmd, bn) dbm_set((bmd), (bn), 1, 0) argument
|
/illumos-gate/usr/src/cmd/rmformat/ |
H A D | rmf_menu.c | 838 diskaddr_t bn; in process_V_flag() local 878 for (bn = 0; bn < (uint32_t)med_info.sm_capacity; in process_V_flag() 879 bn += verify_size) { in process_V_flag() 880 new_per = (bn * 80)/(uint32_t)med_info.sm_capacity; in process_V_flag() 887 verify_size, bn); in process_V_flag() 888 ret = verify(handle, fd, bn, verify_size, read_buf, in process_V_flag() 892 ret = verify(handle, fd, bn, verify_size, in process_V_flag() 901 if ((bn + j) >= capacity) in process_V_flag() 905 "at %llu\n", 1, bn + j); in process_V_flag() 906 ret = verify(handle, fd, bn + j, 1, in process_V_flag() [all …]
|
/illumos-gate/usr/src/lib/fm/topo/modules/i86pc/hostbridge/ |
H A D | hb_i86pc.c | 37 hb_process(topo_mod_t *mod, tnode_t *ptn, topo_instance_t hbi, di_node_t bn) in hb_process() argument 42 if ((hbdid = did_create(mod, bn, 0, hbi, NO_RC, TRUST_BDF)) == NULL) in hb_process() 44 if ((hb = pcihostbridge_declare(mod, ptn, bn, hbi)) == NULL) in hb_process() 56 rc_process(topo_mod_t *mod, tnode_t *ptn, topo_instance_t hbi, di_node_t bn) in rc_process() argument 62 if ((hbdid = did_create(mod, bn, 0, hbi, hbi, TRUST_BDF)) == NULL) in rc_process() 64 if ((hb = pciexhostbridge_declare(mod, ptn, bn, hbi)) == NULL) in rc_process() 66 if ((rc = pciexrc_declare(mod, hb, bn, hbi)) == NULL) in rc_process()
|
/illumos-gate/usr/src/grub/grub-0.97/stage2/ |
H A D | fsys_ufs.c | 168 sbmap(grub_daddr32_t bn) in sbmap() argument 175 if (bn < UFS_NDADDR) { in sbmap() 176 return db[bn]; in sbmap() 181 bn -= UFS_NDADDR; in sbmap() 183 while (bn >= bound) { in sbmap() 185 bn -= bound; in sbmap() 205 index = (bn / bound) % UFS_NINDIR(SUPERBLOCK); in sbmap() 218 index = (bn / bound) % UFS_NINDIR(SUPERBLOCK); in sbmap()
|
/illumos-gate/usr/src/cmd/format/ |
H A D | global.h | 149 #define bn2c(bn) (uint_t)((diskaddr_t)(bn) / spc()) argument 150 #define bn2h(bn) (uint_t)(((diskaddr_t)(bn) % spc()) / nsect) argument 151 #define bn2s(bn) (uint_t)(((diskaddr_t)(bn) % spc()) % nsect) argument
|
H A D | analyze.c | 97 static int scan_repair(diskaddr_t bn, int mode); 447 scan_repair(diskaddr_t bn, int mode) in scan_repair() argument 476 status = (*cur_ops->op_rdwr)(DIR_READ, cur_file, bn, 1, in scan_repair() 485 buf_is_good ? "soft" : "hard", bn); in scan_repair() 486 pr_dblock(fmt_print, bn); in scan_repair() 489 status = (*cur_ops->op_repair)(bn, mode); in scan_repair() 505 fmt_print("Warning: Block %llu zero-filled.\n", bn); in scan_repair() 509 status = (*cur_ops->op_rdwr)(DIR_WRITE, cur_file, bn, in scan_repair() 512 status = (*cur_ops->op_rdwr)(DIR_READ, cur_file, bn, in scan_repair() 532 add_ldef(bn, &cur_list); in scan_repair() [all …]
|
H A D | menu_command.c | 1221 diskaddr_t bn; in c_repair() local 1275 bn = input(FIO_BN, in c_repair() 1283 if (checkmount(bn, bn)) { in c_repair() 1290 if (checkswap(bn, bn)) { in c_repair() 1296 if (checkdevinuse(cur_disk->disk_name, bn, bn, 0, 0)) { in c_repair() 1317 status = (*cur_ops->op_rdwr)(DIR_READ, cur_file, bn, in c_repair() 1344 status = (*cur_ops->op_rdwr)(DIR_READ, cur_file, bn, in c_repair() 1361 fmt_print("block %llu (", bn); in c_repair() 1362 pr_dblock(fmt_print, bn); in c_repair() 1367 status = (*cur_ops->op_repair)(bn, F_NORMAL); in c_repair() [all …]
|
H A D | io.c | 415 blkaddr_t bn; in input() local 817 if (geti(cleantoken, (int *)&bn, NULL)) in input() 822 if ((bn < bounds->lower) || (bn > bounds->upper)) { in input() 823 err_print("`%lu' is out of range [%llu-%llu].\n", bn, in input() 830 return (bn); in input() 883 if (geti(cleantoken, (int *)&bn, NULL)) in input() 888 if ((bn < bounds->lower) || (bn > bounds->upper)) { in input() 889 err_print("`%lu' is out of range [%llu-%llu].\n", bn, in input() 898 *deflt = bn; in input() 2121 pr_dblock(void (*func)(char *, ...), diskaddr_t bn) in pr_dblock() argument [all …]
|
/illumos-gate/usr/src/cmd/lastcomm/ |
H A D | lc_pacct.c | 41 int bn, cc; in lc_pacct() local 60 for (bn = ((unsigned)sb.st_size / BUF_SIZ) + 1; bn >= 0; bn--) { in lc_pacct() 61 if (lseek(fd, (unsigned)bn * BUF_SIZ, 0) == -1) { in lc_pacct()
|
/illumos-gate/usr/src/uts/common/fs/ufs/ |
H A D | ufs_extvnops.c | 77 daddr_t bn; in ufs_rdwr_data() local 115 if ((error = bmap_read(ip, offset1, &bn, &contig)) != 0) { in ufs_rdwr_data() 118 ASSERT(!(bn == UFS_HOLE && iswrite)); in ufs_rdwr_data() 119 if (bn == UFS_HOLE) { in ufs_rdwr_data() 165 bp->b_blkno = bn; in ufs_rdwr_data() 247 daddr_t bn; in ufs_alloc_data() local 342 error = bmap_read(ip, uoff, &bn, in ufs_alloc_data() 356 bp->b_blkno = bn; in ufs_alloc_data() 408 error = bmap_read(ip, uoff, &bn, &contig); in ufs_alloc_data() 415 if (bn != UFS_HOLE) { in ufs_alloc_data() [all …]
|
H A D | ufs_directio.c | 336 daddr_t bn; in ufs_directio_write() local 475 error = bmap_read(ip, uoff, &bn, &len); in ufs_directio_write() 476 if (error || bn == UFS_HOLE || len == 0) in ufs_directio_write() 663 error = bmap_read(ip, uoff, &bn, &len); in ufs_directio_write() 666 if (bn == UFS_HOLE || len == 0) in ufs_directio_write() 687 directio_start(ufsvfsp, ip, nbytes, ldbtob(bn), in ufs_directio_write() 807 daddr_t bn; in ufs_directio_read() local 964 error = bmap_read(ip, uoff, &bn, &len); in ufs_directio_read() 968 if (bn == UFS_HOLE) { in ufs_directio_read() 997 ldbtob(bn), iov->iov_base, in ufs_directio_read()
|
H A D | ufs_subr.c | 785 ufs_badblock(struct inode *ip, daddr_t bn) in ufs_badblock() argument 792 ASSERT(bn); in ufs_badblock() 793 if (bn <= 0 || bn > ip->i_fs->fs_size) in ufs_badblock() 794 return (bn); in ufs_badblock() 797 c = dtog(ip->i_fs, bn); in ufs_badblock() 808 if ((bn < cgbase(ip->i_fs, c)) || in ufs_badblock() 809 (bn >= cgsblock(ip->i_fs, c) && bn < cgdmin(ip->i_fs, c)+sum) || in ufs_badblock() 810 (bn >= (unsigned)cgbase(ip->i_fs, c+1))) in ufs_badblock() 811 return (bn); in ufs_badblock() 1072 ufs_fbiwrite(struct fbuf *fbp, struct inode *ip, daddr_t bn, long bsize) in ufs_fbiwrite() argument [all …]
|
H A D | ufs_inode.c | 1046 indirtrunc(struct inode *ip, daddr_t bn, daddr_t lastbn, int level, int flags) in indirtrunc() argument 1080 ip->i_dev, (daddr_t)fsbtodb(fs, bn), (int)fs->fs_bsize); in indirtrunc() 1166 daddr_t bn, lastiblock[NIADDR]; in ufs_itrunc() local 1424 bn = ip->i_ib[level]; in ufs_itrunc() 1425 if (bn != 0) { in ufs_itrunc() 1427 indirtrunc(ip, bn, lastiblock[level], level, flags); in ufs_itrunc() 1430 free(ip, bn, (off_t)fs->fs_bsize, in ufs_itrunc() 1443 bn = ip->i_db[i]; in ufs_itrunc() 1444 if (bn == 0) in ufs_itrunc() 1448 free(ip, bn, bsize, flags); in ufs_itrunc() [all …]
|
/illumos-gate/usr/src/lib/libnsl/yp/ |
H A D | dbm.c | 343 long bn; in getbit() local 350 bn = bitno / BYTESIZ; in getbit() 351 i = bn % DBLKSIZ; in getbit() 352 b = bn / DBLKSIZ; in getbit() 371 long bn; in setbit() local 381 bn = bitno / BYTESIZ; in setbit() 382 i = bn % DBLKSIZ; in setbit() 383 b = bn / DBLKSIZ; in setbit()
|
/illumos-gate/usr/src/ucblib/libdbm/ |
H A D | dbm.c | 359 long bn; in getbit() local 366 bn = bitno / BYTESIZ; in getbit() 367 i = bn % DBLKSIZ; in getbit() 368 b = bn / DBLKSIZ; in getbit() 386 long bn; in setbit() local 396 bn = bitno / BYTESIZ; in setbit() 397 i = bn % DBLKSIZ; in setbit() 398 b = bn / DBLKSIZ; in setbit()
|
/illumos-gate/usr/src/lib/libc/port/gen/ |
H A D | ndbm.c | 722 long bn; in dbm_access() local 735 bn = my_bitno / BYTESIZ; in dbm_access() 736 i = bn % DBLKSIZ; in dbm_access() 737 b = bn / DBLKSIZ; in dbm_access() 786 long bn; in getbit() local 793 bn = db->dbm_bitno / BYTESIZ; in getbit() 794 i = bn % DBLKSIZ; in getbit() 795 b = bn / DBLKSIZ; in getbit() 811 long bn; in setbit() local 818 bn = db->dbm_bitno / BYTESIZ; in setbit() [all …]
|
/illumos-gate/usr/src/uts/sun4u/sys/ |
H A D | prom_plat.h | 260 extern int prom_attach_notice(int bn); 261 extern int prom_detach_notice(int bn); 262 extern int prom_opl_switch_console(int bn);
|
/illumos-gate/usr/src/uts/common/vm/ |
H A D | hat_refmod.c | 92 uint_t bn; /* bit number */ in hat_startstat() local 126 for (bn = 1, id = 2; bn < (nbits - 1); bn++, id <<= 1) in hat_startstat() 129 if (bn >= (nbits - 1)) { in hat_startstat()
|
/illumos-gate/usr/src/uts/i86pc/io/dr/ |
H A D | dr_quiesce.c | 431 char *bn; in dr_resume_devices() local 450 if ((bn = ddi_binding_name(dip)) != NULL) { in dr_resume_devices() 451 major = ddi_name_to_major(bn); in dr_resume_devices() 453 bn = "<null>"; in dr_resume_devices() 455 if (!dr_bypass_device(bn) && in dr_resume_devices() 474 prom_printf("\tresuming %s@%s\n", bn, in dr_resume_devices() 487 d_name[0] ? d_name : bn, d_info); in dr_resume_devices() 498 d_name[0] ? d_name : bn, d_info); in dr_resume_devices()
|
/illumos-gate/usr/src/uts/sun4u/ngdr/io/ |
H A D | dr_quiesce.c | 432 char *bn; in dr_resume_devices() local 451 if ((bn = ddi_binding_name(dip)) != NULL) { in dr_resume_devices() 452 major = ddi_name_to_major(bn); in dr_resume_devices() 454 bn = "<null>"; in dr_resume_devices() 456 if (!dr_bypass_device(bn) && in dr_resume_devices() 475 prom_printf("\tresuming %s@%s\n", bn, in dr_resume_devices() 488 d_name[0] ? d_name : bn, d_info); in dr_resume_devices() 499 d_name[0] ? d_name : bn, d_info); in dr_resume_devices()
|
/illumos-gate/usr/src/common/fs/ |
H A D | ufsops.c | 70 static daddr32_t sbmap(fileid_t *filep, daddr32_t bn); 209 sbmap(fileid_t *filep, daddr32_t bn) in sbmap() argument 224 if (bn < NDADDR) { in sbmap() 225 nb = db[bn]; in sbmap() 234 bn -= NDADDR; in sbmap() 237 if (bn < sh) in sbmap() 239 bn -= sh; in sbmap() 264 i = (bn / sh) % NINDIR(&devp->un_fs.di_fs); in sbmap()
|
/illumos-gate/usr/src/stand/lib/fs/ufs/ |
H A D | ufsops.c | 92 static daddr32_t sbmap(fileid_t *filep, daddr32_t bn); 249 sbmap(fileid_t *filep, daddr32_t bn) in sbmap() argument 264 if (bn < NDADDR) { in sbmap() 265 nb = db[bn]; in sbmap() 274 bn -= NDADDR; in sbmap() 277 if (bn < sh) in sbmap() 279 bn -= sh; in sbmap() 311 i = (bn / sh) % NINDIR(&devp->un_fs.di_fs); in sbmap()
|
/illumos-gate/usr/src/cmd/sed/ |
H A D | main.c | 400 char bn[PATH_MAX]; in mf_fgets() local 402 (void) strlcpy(bn, fname, sizeof (bn)); in mf_fgets() 419 basename(bn)); in mf_fgets()
|