~ubuntu-branches/ubuntu/trusty/systemd/trusty

« back to all changes in this revision

Viewing changes to src/shared/virt.c

Tags: upstream-202
ImportĀ upstreamĀ versionĀ 202

Show diffs side-by-side

added added

removed removed

Lines of Context:
62
62
        union {
63
63
                uint32_t sig32[3];
64
64
                char text[13];
65
 
        } sig;
 
65
        } sig = {};
66
66
        unsigned i;
67
67
        const char *j, *k;
68
68
        bool hypervisor;
84
84
                return r;
85
85
 
86
86
        /* http://lwn.net/Articles/301888/ */
87
 
        zero(sig);
88
87
 
89
88
#if defined (__i386__)
90
89
#define REG_a "eax"
169
168
}
170
169
 
171
170
int detect_container(const char **id) {
172
 
        char *e = NULL;
 
171
        _cleanup_free_ char *e = NULL;
173
172
        int r;
174
173
 
175
174
        /* Unfortunately many of these operations require root access
217
216
                        *id = "other";
218
217
        }
219
218
 
220
 
        free(e);
221
 
 
222
219
        return r;
223
220
}
224
221