summaryrefslogtreecommitdiff
path: root/lib/libdisk/write_ia64_disk.c
Commit message (Collapse)AuthorAgeFilesLines
* Fix a bug in the size of the PMBR partition. Since the partition startsMarcel Moolenaar2006-08-091-0/+2
| | | | | | | at LBA 1, the size is not the mediasize in sectors, but one less. Notes: svn path=/head/; revision=161135
* In Write_Disk(), fix the non-error case where we returned to theMarcel Moolenaar2004-01-301-4/+0
| | | | | | | | | | | caller without closing the disk device and freeing allocated memory. Not closing the disk device prevents GEOM from retasting after spoiling. Pointy hat: marcel Notes: svn path=/head/; revision=125253
* Fix an uninitialized variable bug that caused write_pmbr() to boguslyMarcel Moolenaar2004-01-281-3/+4
| | | | | | | | | return an error value that made Write_Disk() abort. While on the subject, improve the initialization of the error variable in read_gpt() and update_gpt() even though nothing was broken there. Notes: svn path=/head/; revision=125124
* Declare crc32 static. There's a copy in libz that conflicts for theMarcel Moolenaar2003-11-171-1/+1
| | | | | | | | | crunched binary. Found by: make release Notes: svn path=/head/; revision=122839
* o Save a copy of the GPT entries for which there's a chunk with anMarcel Moolenaar2003-11-041-10/+55
| | | | | | | | | | | | | | index referencing it. We need to know the original type and name so that we know what to put in the table when we reconstruct it. o Clear the table entries before we rebuild it to avoid that we end up with stale data. o Sequentially populate the table entries from the chunks. For the chunks that have an index (now referencing the saved copy) we use the saved type and name. This way we can handle unknown types better. In all cases we update the start and end LBAs. Notes: svn path=/head/; revision=122025
* Don't divide the start and end of the chunk by the sector size whenMarcel Moolenaar2003-11-031-2/+2
| | | | | | | | | filling in the GPT entry. Both are already in sector numbers (LBA) and exactly what we need for the entry. We now write a structurally correct GPT partitioning. Notes: svn path=/head/; revision=121931
* Rewrite Write_Disk() so that it creates a GPT. Note that the code isMarcel Moolenaar2003-11-031-15/+363
| | | | | | | | basicly untested, but the guts is all there. I need to free up a disk before I give it a spin. Notes: svn path=/head/; revision=121921
* Turn Write_Disk() into a stub for now. It needs to be rewritten toMarcel Moolenaar2003-11-021-149/+2
| | | | | | | write out a GPT and not a MBR. Notes: svn path=/head/; revision=121889
* Libdisk does not need to include <sys/diskslice.h> any more.Poul-Henning Kamp2003-04-041-1/+0
| | | | | | | | | | | | Move the remaining bits of <sys/diskslice.h> to <i386/include/bootinfo.h> Move i386/pc98 specific bits from <sys/reboot.h> to <i386/include/bootinfo.h> as well. Adjust includes in sys/boot accordingly. Notes: svn path=/head/; revision=113083
* - Remove unused old disk pointers from Write_FreeBSD() and Fill_Disklabel()John Baldwin2003-02-041-1/+1
| | | | | | | | functions. - Clean up a few signed/unsigned warnings. Notes: svn path=/head/; revision=110339
* Fixed style(9)Yoshihiro Takahashi2002-11-151-10/+12
| | | | Notes: svn path=/head/; revision=106949
* General cleanup:Marcel Moolenaar2002-11-101-96/+68
| | | | | | | | | | | | | | | | | | | | | | | | | | o Remove all code guarded by !defined(__ia64__). This file is specifically written for ia64, o Handle the case when read_block() or write_block() fails. We don't want sysinstall(8) to signal a thumbs-up on error, o Set the starting (cyl,hd,sect) triple to 0xFFFFFF when either bios_hd or bios_sect is zero or the LBA us not representable with the triple. In that case automaticly initialize the ending triple with 0xFFFFFF as well, o Reindent Write_Int32() as it was different than the rest of the file, o Remove some unused variables that appeared to be used but were effectively useless. o Plug a memory leak: The second timne we read the MBR, we write out a modified block, but didn't free the memory after writing. o Replace d1->sector_size with 512 when we read/write the MBR. We ignore the sector size in cases we shouldn't but adhered to it in cases it would be wrong if the sector_size wasn't 512. This file should eventually be rewritten to write out a GPT. For now, a MBR will do... Notes: svn path=/head/; revision=106741
* Add back ia64 support that was removed in the last few revisions.Peter Wemm2002-10-271-0/+8
| | | | | | | I've cloned write_ia64_disk.c from write_i386_disk.c. Notes: svn path=/head/; revision=106008
* More lobotomy:Poul-Henning Kamp2002-10-231-5/+1
| | | | | | | | | | remove CHUNK_BSD_COMPAT, it was a bad idea, and now its gone. remove DOSPTYP_ONTRACK, missed in OnTrack removal commit. unifdef -DHAVE_GEOM make tst01 compile again. Notes: svn path=/head/; revision=105821
* Remove unnecessary ioctls tickling kernel side to realize that we fiddledPoul-Henning Kamp2002-10-231-11/+0
| | | | | | | with the disk. GEOM will automatically retaste when we closet he filedesc. Notes: svn path=/head/; revision=105817
* Untangle #ifdefs in the write-end of things by giving each arch itsPoul-Henning Kamp2002-10-231-0/+212
own file and own copy of WriteDisk() to do things in. This should have happened years ago, instead of adding #ifdefs all over the place. Notes: svn path=/head/; revision=105816