289 static PyObject * doWipeRaidSuperblock(PyObject * s, PyObject * args) {
290 int fd;
291 unsigned long size;
292 struct mdp_super_t * sb;
293
294 if (!PyArg_ParseTuple(args, "i", &fd)) return NULL;
295
when PyArg_ParseTuple() succeeds
taking False path
296 if (ioctl(fd, BLKGETSIZE, &size)) {
297 PyErr_SetFromErrno(PyExc_SystemError);
when considering value == (int)0 from isys.c:297
taking False path
298 return NULL;
299 }
300
301 /* put the size in 1k blocks */
302 size >>= 1;
303
304 if (lseek64(fd, ((off64_t) 512) * (off64_t) MD_NEW_SIZE_SECTORS(size), SEEK_SET) < 0) {
305 PyErr_SetFromErrno(PyExc_SystemError);
when considering range: 0 <= value <= 0x7fffffffffffffff
taking False path
306 return NULL;
307 }
308
309 sb = malloc(sizeof(mdp_super_t));
310 sb = memset(sb, '\0', sizeof(mdp_super_t));
311
312 if (write(fd, sb, sizeof(sb)) != sizeof(sb)) {
313 PyErr_SetFromErrno(PyExc_SystemError);
when considering value == (ssize_t)8 from isys.c:313
taking False path
ob_refcnt is now refs: 0 + N where N >= 1
314 return NULL;
315 }
316
317 return Py_None;
318 }
319