History log of /haiku/src/bin/writembr/writembr.cpp
Revision Date Author Comments
# ad398477 22-Apr-2022 Adrien Destugues <adrien.destugues@opensource.viveris.fr>

Enable some more Werror and fix compiler warnings

- All servers are now Werror
- All bus_managers are now Werror
- All input_server add-ons are now Werror
- Some more things in bin/ are Werror

Only tested on x86_64, I'll let the buildbot test on x86_gcc2 and RISC-V

Change-Id: I5ec86512eac729c862828a45d8431f85c4ec422b
Reviewed-on: https://review.haiku-os.org/c/haiku/+/5226
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
Reviewed-by: Jérôme Duval <jerome.duval@gmail.com>


# a2647907 29-Oct-2014 Michael Lotz <mmlr@mlotz.ch>

writembr: Fix too short MBR due to wrong compile flags.

The compile flags were set so that only the boot code itself would be
produced, excluding the (dummy) partition table and signature. The code
in writembr still assumed that the MBR would be 512 bytes however and
therefore access the data array out of bounds.

Fix flags to produce the full 512 byte MBR sector and add a
STATIC_ASSERT so that the size assumption is checked on compilation.

Also fix a typo in mbr.nasm, mostly to trigger re-generation of the
MBR data that one would otherwise need to remove manually...

The two out of bounds array accesses were pointed out by CID 1249923 and
CID 1249924, the insufficiently large target buffer of the memcpy by
CID 1249901.


# db3aecc8 15-Jan-2012 Siarzhuk Zharski <zharik@gmx.li>

Fix gcc2 build - remove iusing of ios:exceptions

* Fixing gcc2 build by removing exceptions using, that are looking like
not supported by our version of compiler.
* Thanks to Alexander von Gluck for pointing the problem out.


# 1a7322a0 15-Jan-2012 Aleksas Pantechovskis <alexp.frl@gmail.com>

Command line 'writembr' tool implemented

* Implemented writembr tool used to update MBR area with easy boot
loader starting the system from currently active partition;
* This work fixes #5595;
* This is result of GCI2011 task.

Signed-off-by: Siarzhuk Zharski <zharik@gmx.li>


# a2647907273fff22997169ac2fcddeceda8f60e1 29-Oct-2014 Michael Lotz <mmlr@mlotz.ch>

writembr: Fix too short MBR due to wrong compile flags.

The compile flags were set so that only the boot code itself would be
produced, excluding the (dummy) partition table and signature. The code
in writembr still assumed that the MBR would be 512 bytes however and
therefore access the data array out of bounds.

Fix flags to produce the full 512 byte MBR sector and add a
STATIC_ASSERT so that the size assumption is checked on compilation.

Also fix a typo in mbr.nasm, mostly to trigger re-generation of the
MBR data that one would otherwise need to remove manually...

The two out of bounds array accesses were pointed out by CID 1249923 and
CID 1249924, the insufficiently large target buffer of the memcpy by
CID 1249901.


# db3aecc840859422235847724d08986a3b676959 15-Jan-2012 Siarzhuk Zharski <zharik@gmx.li>

Fix gcc2 build - remove iusing of ios:exceptions

* Fixing gcc2 build by removing exceptions using, that are looking like
not supported by our version of compiler.
* Thanks to Alexander von Gluck for pointing the problem out.


# 1a7322a09e825d2445ca88a47cd1d5cd06d3811b 15-Jan-2012 Aleksas Pantechovskis <alexp.frl@gmail.com>

Command line 'writembr' tool implemented

* Implemented writembr tool used to update MBR area with easy boot
loader starting the system from currently active partition;
* This work fixes #5595;
* This is result of GCI2011 task.

Signed-off-by: Siarzhuk Zharski <zharik@gmx.li>