Commit graph

58 commits

Author SHA1 Message Date
Stuart Morrow 3f49507786 mainly just spelling and typos 2021-11-01 20:49:43 +00:00
Humm d6ce7969ed disk/fdisk: add OpenBSD partition type 2021-04-09 16:11:48 +02:00
cinap_lenrek ac88ce4f7f make bind(2) error handling consistent
The mount() and bind() syscalls return -1 on error,
and the mountid sequence number on success.

The manpage states that the mountid sequence number
is a positive integer, but the kernels implementation
currently uses a unsigned 32-bit integer and does not
guarantee that the mountid will not become negative.

Most code just cares about the error, so test for
the -1 error value only.
2020-05-02 17:32:01 +02:00
cinap_lenrek a611fe20e1 disk/format: implement long name support 2019-08-19 01:09:24 +02:00
cinap_lenrek 3b51df75b5 disk/mkfs: remove unused cputype variable (thanks kvik) 2018-11-12 16:54:59 +01:00
cinap_lenrek 303fb49686 disk/edisk: allow printing and readonly inspection of hybrid MBR/GPT disks (thanks aiju)
dumping hybrid MBR/GPT disks is fine, which can sometimes be found
on USB sticks. but prohibit editing.

however, always barf on disks with dos partitions and missing
protecive MBR partition entry.
2017-12-05 23:44:43 +01:00
cinap_lenrek f001ddfdb5 disk/edisk: add some headroom in the type table for dynamic entries 2017-08-01 02:22:01 +02:00
cinap_lenrek 3c7eaa9d6b disk/edisk: add more partition type uuid's from wikipedia (thanks qeed) 2017-08-01 02:08:58 +02:00
cinap_lenrek 234137bce3 fix bugs and cleanup cryptsetup code
devfs:

- fix memory leak in devfs leaking the aes key
- allocate aes-xts cipher state in secure memory
- actually check if the hexkey got fully parsed

cryptsetup:

- get rid of stupid "type YES" prompt
- use genrandom() to generate salts and keys
- rewrite cryptsetup to use common pbkdf2 and readcons routines
- fix alot of error handling and simplify the code
- move cryptsetup command to disk/cryptsetup
- update cryptsetup(8) manual page
2016-10-24 20:56:11 +02:00
cinap_lenrek 677dd90b02 disk/prep: if no 9fat, reserve space for plan9 partition table in autopart (thanks Shamar)
usually, the plan9 partition table is contained in
the first 9fat partition after the pbs/fat header,
but when no 9fat partition is requested, we have
to make sure partitions wont overlap the partition
table (start at sector offset >= 2).
2016-07-08 16:19:15 +02:00
cinap_lenrek dd8908cff0 fdisk: properly convert byte units K,M,G and T to cylinders/sectors
the shared command language assumed 512 byte sectors, which is
not the case for fdisk as it uses cylinders for the block unit.
so we introduce an extra argument in the Edit structure and
parseexpr() function so byte sizes are properly converted to
the block unit when the K,M,G and T postfixes are used.
2016-01-05 03:57:50 +01:00
cinap_lenrek 77e279201d remove kfs and kfscmd 2015-08-21 19:52:57 +02:00
cinap_lenrek 46a7876d32 disk/mkfs: rmeove kfs support 2015-08-21 19:32:48 +02:00
cinap_lenrek e48a5832b2 kfs: adjust to new libauthsrv 2015-08-20 20:56:00 +02:00
cinap_lenrek 00eb2fa448 kfs: set permission of / to 0775 on ream
this allows members of the -1 group to create new directories in /
without having to fiddle with the fileserver console. this also
makes it consistent to hjfs and cwfs.
2015-08-05 13:13:40 +02:00
cinap_lenrek 90bd02d5af mk9660: write data in alphabetical order
*after* writing, the directory tree gets alphabetically sorted for
path table. this causes data to not be in the same order as it was
written causing seeks when taring up the filesystem.

so instead write the files in alphabetical order as well to better
match the directory sorting.
2015-07-14 22:33:27 +02:00
cinap_lenrek 27fb90eb6e vblade, cifs, usbuhci: fix parenthesis 2015-06-13 15:03:56 +02:00
cinap_lenrek 1613fd9f52 disk/edisk: create esp partition in addition to plan9 partition in auto mode 2015-06-05 21:57:08 +02:00
cinap_lenrek e83ef3d1e2 disk/format: create Fatinfo sector for fat32 2015-06-04 03:58:03 +02:00
cinap_lenrek 137a762eca disk/edisk: fix blank mode
there where two problems with blank (-b flag):

we did not update the backup header when there was already a valid
backup header in place. we always want to initialize a new backup header
in blank mode!

we now also check the backup header matches the primary (or the other
way arround depending on which header could be read), reporting any
mismatches and restoring the backup from the data of the primary.

the protective mbr needs to start at sector 1 not 0 (apparently, this
matters for ovmf).
2015-06-03 23:19:13 +02:00
cinap_lenrek 42484b6ef2 disk/fdisk: learn about EFI system partition (type 0xEF), honor protective mbr (type 0xEE)
efi systems may use traditional dos partition table
with an esp (efi system partition). otherwise, honor
the protective mbr partition (0xEE) and exit when we
encounter it.
2015-05-31 19:30:38 +02:00
cinap_lenrek ce76af64fe disk/edisk: little improvements
- make UU() shorter by using long long constant to encode node field
- store Flag as a mask, not as a shift count
- put the attributes before the name in cmdsum() as it is fixed length
2015-05-31 11:19:22 +02:00
cinap_lenrek 1376d559ed disk/edisk: fix usage (was disk/gdisk) 2015-05-30 03:36:58 +02:00
cinap_lenrek 4a4575bd4e disk/edisk: gpt partition table editor (no manpage, work in progress) 2015-05-30 03:22:08 +02:00
cinap_lenrek 09b6a92145 disk/partfs: adding identical partition is no-op 2015-05-30 22:37:46 +02:00
cinap_lenrek b5cbd0bebd disk/fdisk: fix help text 2015-05-30 22:26:18 +02:00
cinap_lenrek ffe862c543 vblade: fix code so #pragma pack isnt needed 2014-12-19 03:57:27 +01:00
cinap_lenrek 6379939642 add erik quanstros vblade utility 2014-12-19 02:50:22 +01:00
cinap_lenrek 5c1803e1ad disk/mkfs: add -o flag to list source files 2014-12-15 00:52:22 +01:00
cinap_lenrek 2cfbc3c1cb mk9660: add -E option to create EFI boot entry 2014-10-31 03:06:09 +01:00
cinap_lenrek 87e187b09c fdisk: fix struct padding for amd64 (from erik quanstros fdisk-64-bit-table patch)
small little patch to help fdisk work properly on 64-bit machines.
sizeof(Table) is 4 bytes too big.
2013-10-16 04:34:58 +02:00
cinap_lenrek 0542f08d10 dump9660: fix volume space size field (from sources, paure)
http://www.ecma-international.org/publications/files/ECMA-ST/Ecma-119.pdf

page 19:

Volume Space Size (BP 81 to 88)
This field shall specify as a 32-bit number the number of Logical Blocks
in which the Volume Space of the volume is recorded.
This field shall be recorded according to 7.3.3.
2013-06-29 12:10:12 +02:00
cinap_lenrek 3787f721c1 9p message size too small
various fileservers do not check if the message size is too small
(they subtract IOHDRSZ later from it to calculate iounit) which
can overflow.
2013-01-30 06:28:42 +01:00
cinap_lenrek 6cadd03bbe fix utf and rune handling in preparation for 32bit runes 2012-12-31 21:09:46 +01:00
google 9d182f906d Add disk/smart to mkfile 2012-09-20 10:42:17 +12:00
google 2a9d702506 Add Erik Quanstrom's smart tool for ATA SMART. 2012-09-20 22:42:06 +12:00
google a71b3dff06 Print correct sizes in prep autopart. 2012-09-09 17:37:21 +12:00
google dd1b8df880 Add alignment hints for e512 ATA drives. 2012-09-09 17:22:12 +12:00
cinap_lenrek acc239ef26 kfs: fix read offset integer overflow 2012-08-01 01:22:01 +02:00
cinap_lenrek 4f33c88a51 import updated compilers from sources 2012-07-30 19:11:16 +02:00
cinap_lenrek 042bc5be35 disk/format, 9boot: fix alignment issues 2012-05-08 16:30:18 +02:00
cinap_lenrek d0007933f2 disk/format: FAT32 support 2012-05-07 18:06:17 +02:00
cinap_lenrek 7fff1f8dba disk/format: choose default cluster size if not given 2012-05-06 13:51:53 +02:00
cinap_lenrek 1e8c6d3d41 disk/mbr: always use 512 byte sectors (imported changes from sources) 2012-03-09 06:10:08 +01:00
aiju a0b12ff8c8 attempt to fix 9vx build 2011-08-18 17:05:52 +02:00
cinap_lenrek 1c5d8e24e3 fdisk: attempt fixing extended partition handling 2011-07-17 21:17:28 +02:00
cinap_lenrek 4ac8429d11 fdisk: use lba values in fdisk when writing partition not possibly rounded cylinders (because we might guessed the disk geometry wrong)
libdisk: make partition geometry detection work
2011-07-14 23:01:01 +02:00
ment 7180b70ad3 disk/format: removed 9fat magic VOLID value 2011-06-08 23:05:20 +02:00
cinap_lenrek 9310110448 fix real cause of iso name truncation 2011-06-06 04:56:50 +00:00
ment dca7c99602 disk/partfs: minor bugfixes 2011-05-09 00:02:02 +02:00