bug-parted
[Top][All Lists]
Advanced

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

Re: [Linux-NTFS-Dev] NTFS resizer


From: Anton Altaparmakov
Subject: Re: [Linux-NTFS-Dev] NTFS resizer
Date: Thu, 09 Aug 2001 02:34:57 +0100

At 06:03 08/08/2001, Andrew Clausen wrote:
One other thing: libparted has a nice (IMHO) error handling system.
It allows users to say things like "Yes/No/Cancel?".  Also, it allows
C++ style try-catch (which is useful for things like bad-blocks).

It's VERY simple :)  (have a look in include/parted/exception.h)

I have found the first particularly useful: it is BAD to stop a resize,
just because you found 1 bad sector, or whatever.

In the ntfs case when properly implemented finding a bad sector will just add the cluster in which it lies to $BadClus and remap it on disk and write it out again, no need to give errors / exceptions. But I doubt you would ever see a bad sector on a modern disk... More likely the disk will die altogether before that.

So, what do you think?  Options:
* cut&paste
* create a similar system, and make libparted wrap it, to integrate
with libparted's system

Thanks, but we would like to keep libntfs as C for now.

Why can't libparted recognize error return values from libntfs and do whatever it likes with them? You can then use your exceptions once the error code path has left libntfs and has come back to libparted... You can then always retry the libntfs call if you were so inclined.

Anton


--
  "Nothing succeeds like success." - Alexandre Dumas
--
Anton Altaparmakov <aia21 at cam.ac.uk> (replace at with @)
Linux NTFS Maintainer / WWW: http://linux-ntfs.sf.net/
ICQ: 8561279 / WWW: http://www-stu.christs.cam.ac.uk/~aia21/




reply via email to

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