-## Check if we want to allow growisofs to cross the 4gb boundary
-def is4gbsupported():
- processi = popen2.Popen4("uname -s -r")
- status = processi.wait()
- if not os.WIFEXITED(status):
-# print "dvd-writepart: Cannot execute uname, allowing to cross the 4gb boundary."
- return 1
- if os.WEXITSTATUS(status) != 0:
-# print "dvd-writepart: Cannot execute uname, allowing to cross the 4gb boundary."
- return 1
- strres = processi.fromchild.readline()[0:-1]
- res = strres.split(" ")
- if len(res) != 2:
-# print "dvd-writepart: Unable to parse uname (" + strres + "), allowing to cross the 4gb boundary."
- return 1
- if res[0] != "Linux":
-# print "dvd-writepart: The current OS is no Linux, allowing to cross the 4gb boundary."
- return 1
- ver = res[1].split(".")
- if len(ver) < 3:
-# print "dvd-writepart: Unable to parse version string (" + res[1] + "), allowing to cross the 4gb boundary."
- return 1
- subver = ver[2].split("-")
-
- if ((not ver[0].isdigit()) or (not ver[1].isdigit()) or (not subver[0].isdigit())):
-# print "dvd-writepart: Unable to parse version string (" + res[1] + "), allowing to cross the 4gb boundary."
- return 1
-
- if (int(ver[0]) > 2) or (int(ver[1]) > 6) or ((int(ver[0]) == 2) and (int(ver[1]) == 6) and (int(subver[0]) >= 8)):
-# print "dvd-writepart: Kernel version >=2.6.8, allowing to cross the 4gb boundary."
- return 1
- else:
-# print "dvd-writepart: Kernel version <2.6.8, not allowing to cross the 4gb boundary."
- return 0
-
-class DVDError(Exception):
- def __init__(self, errno, value):
- self.errno = errno
- self.value = value
- if self.value[-1] == '\n':
- self.value = self.value[0:-1]
- def __str__(self):
- return str(self.value) + " || errno = " + str(self.errno) + " (" + os.strerror(self.errno & 0x7F) + ")"
-
-class disk: