X-Git-Url: http://git.annexia.org/?a=blobdiff_plain;ds=sidebyside;f=lib%2Fdiskimage_fat.ml;fp=lib%2Fdiskimage_fat.ml;h=1fbeac487bf7059b36d12697ff234a54e346c630;hb=116b1583a8e27e587e382fb53dbfce3d21ad9b45;hp=0000000000000000000000000000000000000000;hpb=03c07275c17acf1286d939e8d558a754fa0353c9;p=virt-df.git diff --git a/lib/diskimage_fat.ml b/lib/diskimage_fat.ml new file mode 100644 index 0000000..1fbeac4 --- /dev/null +++ b/lib/diskimage_fat.ml @@ -0,0 +1,48 @@ +(* 'df' command for virtual domains. + (C) Copyright 2007 Richard W.M. Jones, Red Hat Inc. + http://libvirt.org/ + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + + Support for FAT32. +*) + +open Unix +open Printf + +open Diskimage_impl + +(* Private data functions. *) +let attach_private_data, get_private_data = + private_data_functions (fun {fs_cb = {fs_cb_uq = u}} -> u) + +let id = "fat" + +let rec probe dev = + raise Not_found (* XXX *) + +and offset_is_free _ _ = false + +and callbacks = + let i = ref 0 in + fun () -> { + fs_cb_uq = (incr i; !i); + fs_cb_name = id; + fs_cb_printable_name = "DOS/Windows"; + fs_cb_offset_is_free = offset_is_free; + } + +(* Register the plugin. *) +let () = register_plugin ~filesystem:probe id