#10134: DriveSetup: some new functions ---------------------------------------+---------------------------- Reporter: dsjonny | Owner: stippi Type: enhancement | Status: new Priority: normal | Milestone: R1 Component: Applications/DriveSetup | Version: R1/Development Resolution: | Keywords: Blocked By: | Blocking: Has a Patch: 1 | Platform: All ---------------------------------------+---------------------------- Comment (by axeld): In general, I'm not a fan of those icons. They aren't that meaningful, and don't really help. Looking at the patch, I have a number of remarks: - The encryption detection should not be duplicated, please move it into its own method that is called for the partition and its parent. - You are appending a potentially not-null terminated buffer to a string. This may crash depending on the data you read. Since I doubt that the position of those strings actually change, you should just use memcmp() on the buffer directly instead. - Also, when you read from a disk, always check the result. - You should not trow from a thread function -- you never catch it, and the error is never reported. Instead, the application probably aborts. - The {} after case go to the next line. - The "save image" functionality is completely superfluous IMO. - When creating a disk image, you should not write a buffer repeatedly (especially not a small buffer) -- this just takes ages. Instead, just seek to the position. This will also enable sparse file support for the file systems that support that. - "Readonly" is not a word. -- Ticket URL: <http://dev.haiku-os.org/ticket/10134#comment:15> Haiku <http://dev.haiku-os.org> Haiku - the operating system.