From: Stelian P. <st...@po...> - 2008-06-27 09:47:44
|
Le vendredi 20 juin 2008 à 17:32 -0700, Kenneth Porter a écrit : > On Friday, June 06, 2008 2:32 PM -0700 Kenneth Porter > <sh...@se...> wrote: > > > It would be desirable if these miscompares were instead reported with a > > different message to identify the true nature of the miscompare. For > > example, "<path> masked by mount point <mount point>". > > > (Alas, I don't know which API to use to query a path's filesystem. I use > > "df <path>" from the command line, so I'd go digging through the df > > source for that.) > > It looks like the filesystem is identified by the st_dev member returned by > stat(2). stat() is invoked on the root of the compared filesystem at the > start of the compare operation, and for each node compared, so in principle > one could compare the st_dev of the two before comparing anything else. This would work if the target file exists, but how to deal with a missing target file ? (for example, supposed that you dumped /dev/hda, but when comparing you don't found this file). What we need when comparing is to find out if a whole path is masked my a mount point and then stop comparing all the leafs of this path. But since the comparing is done in the inode number order (not in the directory / contents order), it's not that simple. Stelian. -- Stelian Pop <st...@po...> |