예제 #1
0
파일: hivex.c 프로젝트: imcleod/libguestfs
int64_t
do_hivex_value_type (int64_t valueh)
{
  hive_type r;

  NEED_HANDLE (-1);

  if (hivex_value_type (h, valueh, &r, NULL) == -1) {
    reply_with_perror ("failed");
    return -1;
  }

  return r;
}
예제 #2
0
파일: hivex-py.c 프로젝트: coriolis/hivex
static PyObject *
py_hivex_value_type (PyObject *self, PyObject *args)
{
  PyObject *py_r;
  int r;
  size_t len;
  hive_type t;
  hive_h *h;
  PyObject *py_h;
  long val;

  if (!PyArg_ParseTuple (args, (char *) "Ol:hivex_value_type", &py_h, &val))
    return NULL;
  h = get_handle (py_h);
  r = hivex_value_type (h, val, &t, &len);
  if (r == -1) {
    PyErr_SetString (PyExc_RuntimeError,
                     strerror (errno));
    return NULL;
  }

  py_r = put_len_type (len, t);
  return py_r;
}