> In addition, I'll add lxcapi_snapshot_destroy(), which will look like: > > c = lxc_container_new("c0", "/var/lib/lxc"); > c->snapshot_destroy(c, "snap1"); > lxc_container_put(c); > > As for snapshot_list, I'm thinking it will just look like: > > c = lxc_container_new("c0", "/var/lib/lxc"); > ns = c->snapshot_entries(c, NULL, 0); > for (i=0; i<ns; i++) { > c2 = c->get_snapshot(c, i); > printf("name is %s, lxcpath %s\n", c->name, c->config_path); > lxc_container_put(c2); > } > lxc_container_put(c); > > with 'timestamp' and 'comment_file' fields being added to struct > container_struct, usually both NULL.
No, I guess it's better to have a struct lxc_snapshot { // restore the container as a real container in lxcpath struct lxc_container *(*restore)(char *name); char *(*get_comment)(void); char *(*timestamp)(void); // return a lxc_container for the snapshot itself struct lxc_container *(*open)(void); bool (*destroy)(void); }; ------------------------------------------------------------------------------ Learn the latest--Visual Studio 2012, SharePoint 2013, SQL 2012, more! Discover the easy way to master current and previous Microsoft technologies and advance your career. Get an incredible 1,500+ hours of step-by-step tutorial videos with LearnDevNow. Subscribe today and save! http://pubads.g.doubleclick.net/gampad/clk?id=58040911&iu=/4140/ostg.clktrk _______________________________________________ Lxc-devel mailing list Lxc-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/lxc-devel