bug-ddrescue
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Bug-ddrescue] [PATCH] Add proper device size and name detection on


From: Antonio Diaz Diaz
Subject: Re: [Bug-ddrescue] [PATCH] Add proper device size and name detection on Haiku
Date: Wed, 05 Nov 2014 19:48:03 +0100
User-agent: Mozilla/5.0 (X11; U; Linux i586; en-US; rv:1.7.11) Gecko/20050905

Hello Felix,

Felix Ehlermann wrote:
wouldn't it be possible to implement some kind of plug-in support in
ddrescue?

Sure it would be possible, but I see no reason to do it.

There are two kinds of platform-specific code that people want to add to ddrescue; code that compensates shortcomings in the POSIX implementation of a given OS, and code that provides functionality beyond POSIX.

Of the first kind I am only willing to accept trivial additions, like the one for O_BINARY:

  #ifndef O_BINARY
  #define O_BINARY 0
  #endif

Haiku, for example, has chosen to be compatible with BeOS at both the source and binary level, allowing software written and compiled for BeOS to be compiled and run without modification on Haiku. Therefore the only ways for ddrescue to run on Haiku are:

a) Haiku implements properly the parts of POSIX that ddrescue needs.
b) Haiku maintains its own port of ddrescue, as it does with GCC[1].

It is not my fault that OS development has happened in total chaos (just like most human enterprises).

[1]http://en.wikipedia.org/wiki/Haiku_(operating_system)#Compatibility_with_BeOS


About the second kind of code additions (providing functionality beyond POSIX), mi intention is to implement each feature just once, in the way that is best and most probable to be eventualy included in POSIX (by default the one working on GNU/Linux).

BTW, the case you propose as an example (send some device specific commands to disable bad sector relocation before ddrescue continues with its usual operation) can (and should) be done using a separate tool like hdparm.


Best regards,
Antonio.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]