[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

[Libguestfs] [PATCH 0/23] factor and const-correctness



This started as a simple warning-elimination change.
I'll get back to that series shortly ;-)
It turned into a factorization and constification exercise
during which I got a taste of ocaml.  Thanks to Rich Jones
for help with a few snippets in generator.ml.

The overall result is that many previously-manually-maintained
bits from daemon/*.c functions are now hoisted into the automatically-
generated (by generator.ml) file, stubs.c.  Now, many of the
interfaces in daemon/*.c (with declarations in the autogenerated
file, daemon/actions.h) that were not const-correct are.

 daemon/augeas.c    |   25 +--
 daemon/blockdev.c  |   24 +--
 daemon/checksum.c  |    5
 daemon/cmp.c       |    8 -
 daemon/command.c   |    6
 daemon/cpmv.c      |   12 -
 daemon/daemon.h    |   22 +--
 daemon/debug.c     |    2
 daemon/devsparts.c |    4
 daemon/df.c        |    4
 daemon/dir.c       |   50 +------
 daemon/du.c        |    5
 daemon/ext2.c      |   28 +---
 daemon/fallocate.c |    5
 daemon/file.c      |   59 +-------
 daemon/find.c      |    5
 daemon/fsck.c      |    4
 daemon/glob.c      |    5
 daemon/grep.c      |   29 +---
 daemon/grub.c      |    6
 daemon/guestfsd.c  |    2
 daemon/headtail.c  |   13 -
 daemon/hexdump.c   |    5
 daemon/initrd.c    |    5
 daemon/inotify.c   |    6
 daemon/link.c      |   17 --
 daemon/ls.c        |   10 -
 daemon/lvm.c       |   30 +---
 daemon/mknod.c     |   11 -
 daemon/mount.c     |   54 +++----
 daemon/ntfs.c      |    4
 daemon/readdir.c   |    5
 daemon/realpath.c  |    5
 daemon/scrub.c     |   14 --
 daemon/sfdisk.c    |   24 +--
 daemon/stat.c      |   15 --
 daemon/strings.c   |    7 -
 daemon/swap.c      |   45 +-----
 daemon/tar.c       |   14 --
 daemon/upload.c    |    6
 daemon/wc.c        |   11 -
 daemon/xattr.c     |   39 ++---
 daemon/zero.c      |    4
 daemon/zerofree.c  |    4
 src/generator.ml   |  362 ++++++++++++++++++++++++++++++-----------------------
 45 files changed, 430 insertions(+), 590 deletions(-)


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]