~ubuntu-branches/ubuntu/maverick/libvirt/maverick-proposed

« back to all changes in this revision

Viewing changes to src/util/cgroup.c

  • Committer: Bazaar Package Importer
  • Author(s): Guido Günther
  • Date: 2010-04-19 18:11:57 UTC
  • mfrom: (0.2.6 upstream) (3.8.3 sid)
  • mto: This revision was merged to the branch mainline in revision 92.
  • Revision ID: james.westby@ubuntu.com-20100419181157-p8x7wvat9ovlae6m
Tags: 0.8.0-2
* [70fbcb6] New patch 0007-nwfilter-Don-t-crash-if-driverState- NULL.patch
  nwfilter: Don't crash if driverState == NULL (Closes: #577728)
* [d7d1abd] New patch 0008-Ignore-empty-type-statement-in-disk-
  element.patch Ignore empty type statement in disk element
  (Closes: #578347)

Show diffs side-by-side

added added

removed removed

Lines of Context:
12
12
 
13
13
#include <stdio.h>
14
14
#include <stdint.h>
15
 
#include <inttypes.h>
16
15
#ifdef HAVE_MNTENT_H
17
 
#include <mntent.h>
 
16
# include <mntent.h>
18
17
#endif
19
18
#include <fcntl.h>
20
19
#include <string.h>
374
373
    if (rc != 0)
375
374
        goto out;
376
375
 
377
 
    if (sscanf(strval, "%" SCNi64, value) != 1)
 
376
    if (virStrToLong_ll(strval, NULL, 10, value) < 0)
378
377
        rc = -EINVAL;
379
378
out:
380
379
    VIR_FREE(strval);
692
691
    int rc;
693
692
    char *path;
694
693
 
 
694
    if (driver == NULL)
 
695
        return -EINVAL;
 
696
 
695
697
    if (virAsprintf(&path, "%s/%s", driver->path, name) < 0)
696
698
        return -ENOMEM;
697
699