| /openbsd-src/usr.sbin/vmd/ |
| H A D | vioqcow2.c | 111 * Initializes a raw disk image backing file from an fd. Stores the 125 log_warnx("could not open qcow2 disk"); in virtio_qcow2_init() 139 * Return the path to the base image given a disk image. in virtio_qcow2_init() 176 * Relative paths should be interpreted relative to the disk image, in virtio_qcow2_get_base() 209 qc2_open(struct qcdisk *disk, int *fds, size_t nfd) in virtio_qcow2_get_base() 219 pthread_rwlock_init(&disk->lock, NULL); in qc2_open() 221 disk->fd = fd; in qc2_open() 222 disk->base = NULL; in qc2_open() 223 disk->l1 = NULL; in qc2_open() 230 disk in qc2_open() 212 qc2_open(struct qcdisk * disk,int * fds,size_t nfd) qc2_open() argument 332 struct qcdisk *disk, *d; qc2_pread() local 405 struct qcdisk *disk, *d; qc2_pwrite() local 455 struct qcdisk *disk; qc2_close() local 474 xlate(struct qcdisk * disk,off_t off,int * inplace) xlate() argument 534 mkcluster(struct qcdisk * disk,struct qcdisk * base,off_t off,off_t src_phys) mkcluster() argument 598 copy_cluster(struct qcdisk * disk,struct qcdisk * base,off_t dst,off_t src) copy_cluster() argument 615 inc_refs(struct qcdisk * disk,off_t off,int newcluster) inc_refs() argument [all...] |
| /openbsd-src/sbin/fdisk/ |
| H A D | disk.c | 38 struct disk disk; variable 50 disk.dk_name = strdup(name); in DISK_open() 51 if (disk.dk_name == NULL) in DISK_open() 53 disk.dk_fd = opendev(disk.dk_name, oflags, OPENDEV_PART, NULL); in DISK_open() 54 if (disk.dk_fd == -1) in DISK_open() 55 err(1, "opendev('%s', 0x%x)", disk.dk_name, oflags); in DISK_open() 56 if (fstat(disk.dk_fd, &st) == -1) in DISK_open() 57 err(1, "fstat('%s)", disk.dk_name); in DISK_open() 59 errx(1, "%s is not a character device", disk.dk_name); in DISK_open() 60 if (ioctl(disk.dk_fd, DIOCGPDINFO, &dl) == -1) in DISK_open() [all …]
|
| H A D | fdisk.c | 82 if (disk.dk_bootprt.prt_id != DOSPTYP_EFISYS) in main() 83 disk.dk_bootprt.prt_flag = DOSACTIVE; in main() 86 disk.dk_cylinders = strtonum(optarg, 1, 262144, &errstr); in main() 90 disk.dk_size = 0; in main() 102 disk.dk_heads = strtonum(optarg, 1, 256, &errstr); in main() 105 disk.dk_size = 0; in main() 111 disk.dk_size = strtonum(optarg, BLOCKALIGNMENT, in main() 116 disk.dk_cylinders = disk.dk_heads = disk.dk_sectors = 0; in main() 119 disk.dk_sectors = strtonum(optarg, 1, 63, &errstr); in main() 122 disk.dk_size = 0; in main() [all …]
|
| H A D | mbr.c | 63 if (disk.dk_bootprt.prt_ns > 0) { in MBR_init() 64 bootprt = disk.dk_bootprt; in MBR_init() 73 } else if (disk.dk_heads > 1 || disk.dk_cylinders > 1) { in MBR_init() 79 while (daddr < DL_SECTOBLK(&dl, disk.dk_sectors)) in MBR_init() 87 if (obsdprt.prt_bs >= disk.dk_size) { in MBR_init() 90 obsdprt.prt_ns = disk.dk_size - obsdprt.prt_bs; in MBR_init() 190 if (ioctl(disk.dk_fd, DIOCRLDINFO, 0) == -1) in MBR_write()
|
| H A D | disk.h | 19 struct disk { struct 37 extern struct disk disk; argument
|
| H A D | cmd.c | 235 0, disk.dk_cylinders - 1); in edit() 237 0, disk.dk_heads - 1); in edit() 239 1, disk.dk_sectors); in edit() 242 start.chs_cyl, disk.dk_cylinders - 1); in edit() 245 disk.dk_heads - 1); in edit() 248 end.chs_head) ? start.chs_sect : 1, disk.dk_sectors); in edit() 251 track = start.chs_cyl * disk.dk_heads + start.chs_head; in edit() 252 pp->prt_bs = track * disk.dk_sectors + (start.chs_sect - 1); in edit() 253 track = end.chs_cyl * disk.dk_heads + end.chs_head; in edit() 254 pp->prt_ns = track * disk.dk_sectors + (end.chs_sect - 1) - in edit() [all …]
|
| /openbsd-src/sys/sys/ |
| H A D | disk.h | 1 /* $OpenBSD: disk.h,v 1.41 2024/10/30 15:00:12 deraadt Exp $ */ 2 /* $NetBSD: disk.h,v 1.11 1996/04/28 20:22:50 thorpej Exp $ */ 42 * from: Header: disk.h,v 1.5 92/11/19 04:33:03 torek Exp (LBL) 44 * @(#)disk.h 8.1 (Berkeley) 6/2/93 69 struct timeval ds_attachtime; /* time disk was attached */ 74 struct disk { 75 TAILQ_ENTRY(disk) dk_link; /* link in global disklist */ struct 76 struct rwlock dk_lock; /* disk lock */ 78 char *dk_name; /* disk name */ 79 struct device *dk_device; /* disk devic argument 77 dk_lockdisk global() argument 80 dk_devicedisk global() argument 81 dk_devnodisk global() argument 82 dk_flagsdisk global() argument 97 dk_attachtimedisk global() argument 109 dk_byteshiftdisk global() argument 113 dk_labeldisk global() argument [all...] |
| /openbsd-src/usr.sbin/installboot/ |
| H A D | softraid.c | 37 sr_prepare_chunk(int devfd, int vol, int disk) in sr_prepare_chunk() argument 44 diskfd = sr_open_chunk(devfd, vol, disk, &bd, &realdev, &part); in sr_prepare_chunk() 57 int vol = -1, ndisks = 0, disk; in sr_prepareboot() local 66 for (disk = 0; disk < ndisks; disk++) in sr_prepareboot() 67 sr_prepare_chunk(devfd, vol, disk); in sr_prepareboot() 73 int vol = -1, ndisks = 0, disk; in sr_installboot() local 85 for (disk = 0; disk < ndisks; disk++) in sr_installboot() 86 sr_install_bootblk(devfd, vol, disk); in sr_installboot() 152 sr_open_chunk(int devfd, int vol, int disk, struct bioc_disk *bd, in sr_open_chunk() argument 160 bd->bd_diskid = disk; in sr_open_chunk() [all …]
|
| /openbsd-src/regress/usr.sbin/vmd/config/ |
| H A D | vmd-fail-too-many-disks.conf | 4 disk "disk0.img" 5 disk "disk1.img" 6 disk "disk2.img" 7 disk "disk3.img" 8 disk "disk4.img"
|
| /openbsd-src/sbin/ncheck_ffs/ |
| H A D | ncheck_ffs.c | 84 char *disk; /* name of the disk file */ variable 298 disk, strerror(errno), (long long)blkno, size); in bread() 301 "got=%d", disk, (long long)blkno, size, cnt); in bread() 304 disk); in bread() 315 "count=%u", disk, strerror(errno), in bread() 320 "got=%d", disk, (long long)(offset + i) / DEV_BSIZE, in bread() 561 disk = argv[optind]; in main() 562 if ((diskfd = opendev(disk, O_RDONLY, 0, NULL)) >= 0) { in main() 564 err(1, "cannot stat %s", disk); in main() 570 if (realpath(disk, rdisk) == NULL) in main() [all …]
|
| /openbsd-src/gnu/usr.sbin/mkhybrid/src/ |
| H A D | hdisk.pl | 26 ($disk) = @ARGV; 38 open(DISK, $disk) || die "$disk: $!\n"; 49 die "$disk: unsupported partition map\n" if ($pmSig == 0x5453); 50 die "$disk: no partition map\n" unless ($pmSig == 0x504d);
|
| /openbsd-src/usr.bin/file/magdir/ |
| H A D | amigaos | 15 >>48 byte 1 disk icon 51 # Amiga disk types 55 0 string DOS\0 Amiga DOS disk 56 0 string DOS\1 Amiga FFS disk 57 0 string DOS\2 Amiga Inter DOS disk 58 0 string DOS\3 Amiga Inter FFS disk 59 0 string DOS\4 Amiga Fastdir DOS disk 60 0 string DOS\5 Amiga Fastdir FFS disk 61 0 string KICK Kickstart disk
|
| /openbsd-src/sbin/dump/ |
| H A D | main.c | 67 char *disk; /* name of the disk file */ variable 266 if (!disk) { in main() 271 disk = toplevel; in main() 280 msg("Dumping sub files/directories from %s\n", disk); in main() 282 if (strcmp(disk, fsbuf.f_mntonname) != 0) { in main() 283 msg("%s is not on %s\n", argv[i], disk); in main() 291 disk = *argv++; in main() 358 if (!statfs(disk, &fsbuf) && !strcmp(fsbuf.f_mntonname, disk)) { in main() 360 disk = rawname(fsbuf.f_mntfromname); in main() 361 if (!disk) { in main() [all …]
|
| /openbsd-src/usr.sbin/nsd/ |
| H A D | udb.c | 321 uint64_t nsize = udb->alloc->disk->nextgrow; in udb_base_close() 561 alloc->disk = (udb_alloc_d*)((char*)udb->glob_data in udb_base_remap() 777 while(at < alloc->disk->nextgrow) { 792 while(at < alloc->disk->nextgrow) { 900 if(rb_old+rb_size <= alloc->disk->nextgrow 901 && rb_new+rb_size <= alloc->disk->nextgrow) { 921 regen.nextgrow = alloc->disk->nextgrow; 945 *alloc->disk = regen; 961 udb_alloc* udb_alloc_create(udb_base* udb, udb_alloc_d* disk) argument 967 alloc->disk = disk; [all …]
|
| /openbsd-src/distrib/notes/macppc/ |
| H A D | install | 5 on the whole disk or share the disk with Mac OS. 10 If the disk is to be shared with Mac OS, a partition must be preallocated 13 the disk, and then the OpenBSD partition will follow. 14 This may require the disk be reformatted using the "Drive Setup" application 43 OpenBSD/MACHINE can share a disk with Mac OS or Mac OS X by using 44 an HFS partitioned disk. For proper layout, the disk should be 90 partitions created on the disk by the Apple partition editor. 118 the whole disk for OpenBSD. If you don't need to or don't 119 intend to share the disk with other operating systems, 121 a single MBR partition spanning the whole disk, dedicated [all …]
|
| /openbsd-src/usr.sbin/makefs/cd9660/ |
| H A D | cd9660_eltorito.c | 255 cd9660_boot_setup_default_entry(struct cd9660_boot_image *disk) in cd9660_boot_setup_default_entry() argument 267 ie->boot_indicator[0] = disk->bootable; in cd9660_boot_setup_default_entry() 268 ie->media_type[0] = disk->targetMode; in cd9660_boot_setup_default_entry() 269 cd9660_721(disk->loadSegment, ie->load_segment); in cd9660_boot_setup_default_entry() 270 ie->system_type[0] = disk->system; in cd9660_boot_setup_default_entry() 271 cd9660_721(disk->num_sectors, ie->sector_count); in cd9660_boot_setup_default_entry() 272 cd9660_731(disk->sector, ie->load_rba); in cd9660_boot_setup_default_entry() 277 ie->media_type[0], disk->loadSegment, ie->system_type[0], in cd9660_boot_setup_default_entry() 278 disk->num_sectors, disk->sector)); in cd9660_boot_setup_default_entry() 302 cd9660_boot_setup_section_entry(struct cd9660_boot_image *disk) in cd9660_boot_setup_section_entry() argument [all …]
|
| /openbsd-src/sys/scsi/ |
| H A D | files.scsi | 15 device cd: disk 19 device ch: disk 23 device sd: disk 31 device uk: disk 35 device safte: disk 39 device ses: disk
|
| /openbsd-src/distrib/notes/sparc64/ |
| H A D | xfer | 21 disk. 29 Creating a bootable hard disk using SunOS, Solaris or other Unix-like system: 32 "miniroot{:--:}OSrev.img" onto the hard disk you intend to boot on. 34 bootable filesystem image in the "swap" partition of the disk 39 any useful parts of the disk; you can also use another partition, 41 disk label issues described below under "incompatible systems". 44 which have a compatible view of SunOS disk labels and partitions. 58 don't care about the hard disk contents, you can also install the 59 bootable image starting at the beginning of the disk. This lets 62 that the bootable image installed this way includes a "disk label"
|
| /openbsd-src/distrib/notes/alpha/ |
| H A D | xfer | 14 You can copy the miniroot image onto the hard disk you intend to 15 install OpenBSD on. Doing so will overwrite the disk's old contents, 19 to the hard disk you will be using for OpenBSD/MACHINE. You 22 device (whole disk) of the target hard disk. It is suggested
|
| /openbsd-src/distrib/notes/i386/ |
| H A D | prep | 2 SURE YOU HAVE A RELIABLE BACKUP of any data on your hard disk that you 3 wish to keep. Repartitioning your hard disk is an excellent way to 7 supported part of the hard disk -- this could typically be 504MB, 2GB, 14 entire disk, you will need to make space available. Windows can resize its 21 Your hard disk is now prepared to have OpenBSD installed on it, and
|
| /openbsd-src/etc/examples/ |
| H A D | vm.conf | 28 disk "/home/vm/OpenBSD.img" 31 disk $sets "install60.img" 42 disk "/home/vm/vm1-disk.img"
|
| /openbsd-src/distrib/notes/luna88k/ |
| H A D | install | 4 There are several ways to install OpenBSD onto a disk. The easiest way 6 booted off your local disk's swap partition. Alternatively, you can 15 wipe out all the partitions on the hard disk, errors during the install 36 to boot the OpenBSD bootloader from the specified disk and partition. 40 disk drive SCSI ID: 0 1 2 3 4 5 6 43 On LUNA-88K2 systems, if the disk drive is connected to the external SCSI 44 controller, add 10 to this number. For example, to boot from a disk drive 59 disk is sd0):
|
| /openbsd-src/etc/etc.amd64/ |
| H A D | disktab | 3 mini34|gzip bsd.rd disk image 4.4.6875MB:\ 8 install360|install.img disk image 360MB:\ 23 rdroot|ramdiskroot|RAM-disk root FS image:\ 28 rdrootb|ramdiskroot|RAM-disk root FS image:\
|
| /openbsd-src/distrib/notes/amd64/ |
| H A D | prep | 3 SURE YOU HAVE A RELIABLE BACKUP of any data on your hard disk that you 4 wish to keep. Repartitioning your hard disk is an excellent way to 10 entire disk, you will need to make space available. Windows can resize its 16 Your hard disk is now prepared to have OpenBSD installed on it, and
|
| H A D | install | 4 There are several ways to install OpenBSD onto a disk. The easiest way, 7 can boot from a 3.5" 1.44MB floppy disk if your machine has a floppy drive. 19 than from the hard disk. 31 another floppy disk doesn't help, OpenBSD probably can't be run on 46 If you have DOS or Linux partitions defined on the disk, these
|