I cheated and simply use system() for the time being, but I will say that was rather nice and easy. Thank you Sun and OpenSolaris people.


llink.conf:
# If you use ZFS, you can auto-export any filesystem with a certain attribute set.
# For example: zfs set net.lundman:sharellink=on zpool1/media
ROOT|ZFS=net.lundman:sharellink|PATH=/usr/sbin/zfs


@root.c
        debugf("      : looking for ZFS filesystems\n");
        snprintf(buffer, sizeof(buffer), "%s list -H -o mountpoint,%s",
                 path, zfs);
        spawn = lion_system(buffer, 0, LION_FLAG_FULFILL, zfs);
        if (spawn) lion_set_handler(spawn, root_zfs_handler);



# zfs set net.lundman:sharellink=on zpool1/media

# ./llink -d -v 32

./llink - Jorgen Lundman v2.2.1 lund...@shinken.interq.or.jp build 1451 (Tue Aug 18 14:02:44 2009) (libdvdnav).

      : looking for ZFS filesystems
      : [root] recognising 'xtrailers'
      : zfs command running
      : zfs adding '/zpool1/media'
      : [root] recognising '/zpool1/media'
      : zfs command finished.
[main] ready!


--
Jorgen Lundman       | <lund...@lundman.net>
Unix Administrator   | +81 (0)3 -5456-2687 ext 1017 (work)
Shibuya-ku, Tokyo    | +81 (0)90-5578-8500          (cell)
Japan                | +81 (0)3 -3375-1767          (home)
_______________________________________________
zfs-discuss mailing list
zfs-discuss@opensolaris.org
http://mail.opensolaris.org/mailman/listinfo/zfs-discuss

Reply via email to