7191556: (fs) UnixNativeDispatcher.getextmntent should be moved into platform specific code (original) (raw)
Andrew Hughes ahughes at redhat.com
Wed Aug 15 07🔞02 PDT 2012
- Previous message: 7191556: (fs) UnixNativeDispatcher.getextmntent should be moved into platform specific code
- Next message: 7191556: (fs) UnixNativeDispatcher.getextmntent should be moved into platform specific code
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
----- Original Message -----
This one has been in my patch queue for a long time, I'd actually forgotten about it. It's also just a clean-up covering two issues: 1. UnixNativeDispatcher defines getextmntent to read an entry from the mount table but it's not very portable with lots of #ifdef for each platform. The change moves this method down to SolarisNativeDispatcher and adds a getmntent to LinuxNativeDispatcher so it's much cleaner. 2. When the Mac port was added then it included the GNOME FileTypeDetector which I don't think makes sense because it will never be used. The clean-up here is to not build this FileTypeDetector on Mac. The DefaultFileTypeDetector that is compiled when building on Solaris/Linux/Mac is changed so that it delegates to the FileSystemProvider to get the file type detector and this ensures that the proper implementation is included. As I say, this is solely clean-up so there isn't a test. The webrev with the changes is here: http://cr.openjdk.java.net/~alanb/7191556/webrev/ -Alan.
This looks good to me and built ok here.
My only concern is that this now means that Macs now always get a null file type detector, whereas there might have been a working one if glib was installed. The name "GNOMEFileTypeDetector" is a bit of a misnomer as GIO is part of glib, which is intentionally multi-platform (even Windows, I believe).
Maybe worth asking on the BSD and Mac lists? It might motivate them to provide a solution using the native Mac API (assuming there is one) ;-)
Thanks,
Andrew :)
Free Java Software Engineer Red Hat, Inc. (http://www.redhat.com)
PGP Key: 248BDC07 (https://keys.indymedia.org/) Fingerprint = EC5A 1F5E C0AD 1D15 8F1F 8F91 3B96 A578 248B DC07
- Previous message: 7191556: (fs) UnixNativeDispatcher.getextmntent should be moved into platform specific code
- Next message: 7191556: (fs) UnixNativeDispatcher.getextmntent should be moved into platform specific code
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]