mirror of
https://github.com/libguestfs/libguestfs.git
synced 2026-03-21 22:53:37 +00:00
mllib: remove the TTY module
The only function provided is isatty_stdout, which is no more used now in favour of Unix.isatty.
This commit is contained in:
@@ -89,8 +89,6 @@ deps = \
|
||||
$(top_builddir)/mllib/libdir.cmx \
|
||||
$(top_builddir)/mllib/config.cmx \
|
||||
$(top_builddir)/mllib/common_gettext.cmx \
|
||||
$(top_builddir)/mllib/tty-c.o \
|
||||
$(top_builddir)/mllib/tTY.cmx \
|
||||
$(top_builddir)/mllib/common_utils.cmx \
|
||||
$(top_builddir)/mllib/fsync-c.o \
|
||||
$(top_builddir)/mllib/fsync.cmx \
|
||||
|
||||
@@ -68,8 +68,6 @@ deps = \
|
||||
$(top_builddir)/fish/guestfish-uri.o \
|
||||
$(top_builddir)/fish/guestfish-file-edit.o \
|
||||
$(top_builddir)/mllib/common_gettext.cmx \
|
||||
$(top_builddir)/mllib/tty-c.o \
|
||||
$(top_builddir)/mllib/tTY.cmx \
|
||||
$(top_builddir)/mllib/common_utils.cmx \
|
||||
$(top_builddir)/mllib/config.cmx \
|
||||
$(top_builddir)/mllib/regedit.cmx \
|
||||
|
||||
@@ -44,9 +44,6 @@ SOURCES = \
|
||||
progress.ml \
|
||||
regedit.mli \
|
||||
regedit.ml \
|
||||
tty-c.c \
|
||||
tTY.mli \
|
||||
tTY.ml \
|
||||
uri-c.c \
|
||||
uRI.mli \
|
||||
uRI.ml
|
||||
@@ -60,7 +57,6 @@ if HAVE_OCAML
|
||||
ocaml_modules = config \
|
||||
libdir \
|
||||
common_gettext \
|
||||
tTY \
|
||||
common_utils \
|
||||
fsync \
|
||||
progress \
|
||||
@@ -73,7 +69,6 @@ ocaml_modules = config \
|
||||
OBJECTS = \
|
||||
$(top_builddir)/fish/guestfish-progress.o \
|
||||
$(top_builddir)/fish/guestfish-uri.o \
|
||||
tty-c.o \
|
||||
fsync-c.o \
|
||||
progress-c.o \
|
||||
uri-c.o \
|
||||
@@ -152,11 +147,11 @@ DEFAULT_INCLUDES = \
|
||||
check_SCRIPTS = common_utils_tests
|
||||
|
||||
if HAVE_OCAMLOPT
|
||||
common_utils_tests: common_gettext.cmx tty-c.o tTY.cmx common_utils.cmx common_utils_tests.cmx
|
||||
common_utils_tests: common_gettext.cmx common_utils.cmx common_utils_tests.cmx
|
||||
$(OCAMLFIND) ocamlopt $(OCAMLOPTFLAGS) \
|
||||
mlguestfs.cmxa -linkpkg $^ -cclib '$(LIBTINFO_LIBS)' -o $@
|
||||
else
|
||||
common_utils_tests: common_gettext.cmo tty-c.o tTY.cmo common_utils.cmo common_utils_tests.cmo
|
||||
common_utils_tests: common_gettext.cmo common_utils.cmo common_utils_tests.cmo
|
||||
$(OCAMLFIND) ocamlc $(OCAMLCFLAGS) \
|
||||
mlguestfs.cma -linkpkg $^ -cclib '$(LIBTINFO_LIBS)' -custom -o $@
|
||||
endif
|
||||
|
||||
19
mllib/tTY.ml
19
mllib/tTY.ml
@@ -1,19 +0,0 @@
|
||||
(* virt-resize
|
||||
* Copyright (C) 2013 Red Hat Inc.
|
||||
*
|
||||
* 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.,
|
||||
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
*)
|
||||
|
||||
external isatty_stdout : unit -> bool = "virt_resize_isatty_stdout" "noalloc"
|
||||
@@ -1,23 +0,0 @@
|
||||
(* virt-resize
|
||||
* Copyright (C) 2013 Red Hat Inc.
|
||||
*
|
||||
* 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.,
|
||||
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
*)
|
||||
|
||||
(** TTY utilities. *)
|
||||
|
||||
val isatty_stdout : unit -> bool
|
||||
(** RHEL 5-era ocaml didn't have Unix.isatty. This is not needed in
|
||||
recent OCaml. *)
|
||||
@@ -1,40 +0,0 @@
|
||||
/* virt-resize - interface to isatty
|
||||
* Copyright (C) 2013 Red Hat Inc.
|
||||
*
|
||||
* 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
*/
|
||||
|
||||
#include <config.h>
|
||||
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <unistd.h>
|
||||
|
||||
#include <caml/memory.h>
|
||||
#include <caml/mlvalues.h>
|
||||
|
||||
#pragma GCC diagnostic ignored "-Wmissing-prototypes"
|
||||
|
||||
/* RHEL 5-era ocaml didn't have Unix.isatty.
|
||||
*
|
||||
* Note this function is marked as "noalloc" so it must not call any
|
||||
* OCaml allocation functions:
|
||||
* http://camltastic.blogspot.co.uk/2008/08/tip-calling-c-functions-directly-with.html
|
||||
*/
|
||||
value
|
||||
virt_resize_isatty_stdout (value unitv)
|
||||
{
|
||||
return isatty (1) ? Val_true : Val_false;
|
||||
}
|
||||
@@ -252,7 +252,6 @@ make-fs/make-fs.c
|
||||
mllib/fsync-c.c
|
||||
mllib/mkdtemp-c.c
|
||||
mllib/progress-c.c
|
||||
mllib/tty-c.c
|
||||
mllib/uri-c.c
|
||||
ocaml/guestfs-c-actions.c
|
||||
ocaml/guestfs-c.c
|
||||
|
||||
@@ -39,7 +39,6 @@ mllib/mkdtemp.ml
|
||||
mllib/planner.ml
|
||||
mllib/progress.ml
|
||||
mllib/regedit.ml
|
||||
mllib/tTY.ml
|
||||
mllib/uRI.ml
|
||||
resize/resize.ml
|
||||
sparsify/cmdline.ml
|
||||
|
||||
@@ -32,8 +32,6 @@ if HAVE_OCAML
|
||||
|
||||
# Note this list must be in dependency order.
|
||||
deps = \
|
||||
$(top_builddir)/mllib/tty-c.o \
|
||||
$(top_builddir)/mllib/tTY.cmx \
|
||||
$(top_builddir)/mllib/fsync-c.o \
|
||||
$(top_builddir)/mllib/fsync.cmx \
|
||||
$(top_builddir)/fish/guestfish-progress.o \
|
||||
|
||||
@@ -34,7 +34,6 @@ SOURCES_ML = \
|
||||
|
||||
SOURCES_C = \
|
||||
$(top_builddir)/fish/progress.c \
|
||||
$(top_builddir)/mllib/tty-c.c \
|
||||
$(top_builddir)/mllib/progress-c.c \
|
||||
statvfs-c.c
|
||||
|
||||
@@ -54,7 +53,6 @@ virt_sparsify_CFLAGS = \
|
||||
|
||||
BOBJECTS = \
|
||||
$(top_builddir)/mllib/common_gettext.cmo \
|
||||
$(top_builddir)/mllib/tTY.cmo \
|
||||
$(top_builddir)/mllib/common_utils.cmo \
|
||||
$(top_builddir)/mllib/progress.cmo \
|
||||
$(top_builddir)/mllib/config.cmo \
|
||||
|
||||
@@ -82,8 +82,6 @@ if HAVE_OCAML
|
||||
# Note this list must be in dependency order.
|
||||
deps = \
|
||||
$(top_builddir)/mllib/common_gettext.cmx \
|
||||
$(top_builddir)/mllib/tty-c.o \
|
||||
$(top_builddir)/mllib/tTY.cmx \
|
||||
$(top_builddir)/mllib/common_utils.cmx \
|
||||
$(top_builddir)/mllib/uri-c.o \
|
||||
$(top_builddir)/mllib/uRI.cmx \
|
||||
|
||||
@@ -95,7 +95,6 @@ SOURCES_ML = \
|
||||
SOURCES_C = \
|
||||
$(top_builddir)/fish/progress.c \
|
||||
$(top_builddir)/fish/file-edit.c \
|
||||
$(top_builddir)/mllib/tty-c.c \
|
||||
$(top_builddir)/mllib/progress-c.c \
|
||||
$(top_builddir)/mllib/mkdtemp-c.c \
|
||||
$(top_builddir)/customize/crypt-c.c \
|
||||
@@ -123,7 +122,6 @@ virt_v2v_CFLAGS = \
|
||||
|
||||
BOBJECTS = \
|
||||
$(top_builddir)/mllib/common_gettext.cmo \
|
||||
$(top_builddir)/mllib/tTY.cmo \
|
||||
$(top_builddir)/mllib/common_utils.cmo \
|
||||
$(top_builddir)/mllib/regedit.cmo \
|
||||
$(top_builddir)/mllib/progress.cmo \
|
||||
|
||||
Reference in New Issue
Block a user