Commit 0d34ac34 authored by rgaudin's avatar rgaudin
Browse files

changed data partition label

parent b7c369ad
...@@ -10,7 +10,7 @@ import random ...@@ -10,7 +10,7 @@ import random
import tempfile import tempfile
import traceback import traceback
from data import data_dir from data import data_dir, data_partition_label
from backend.content import get_content from backend.content import get_content
from backend.qemu import get_qemu_image_size from backend.qemu import get_qemu_image_size
from backend.util import ( from backend.util import (
...@@ -392,7 +392,9 @@ def format_data_partition(image_fpath, logger): ...@@ -392,7 +392,9 @@ def format_data_partition(image_fpath, logger):
# format the data partition # format the data partition
try: try:
subprocess_pretty_check_call([mkfs_exe, "-n", "data", target_dev], logger) subprocess_pretty_check_call(
[mkfs_exe, "-n", data_partition_label, target_dev], logger
)
finally: finally:
# remove write rights we just added # remove write rights we just added
if previous_mode: if previous_mode:
...@@ -406,7 +408,14 @@ def format_data_partition(image_fpath, logger): ...@@ -406,7 +408,14 @@ def format_data_partition(image_fpath, logger):
try: try:
subprocess_pretty_check_call( subprocess_pretty_check_call(
[diskutil_exe, "eraseVolume", "exfat", "data", target_part], logger [
diskutil_exe,
"eraseVolume",
"exfat",
data_partition_label,
target_part,
],
logger,
) )
finally: finally:
# ensure we release the loop device on mount failure # ensure we release the loop device on mount failure
...@@ -428,7 +437,7 @@ def format_data_partition(image_fpath, logger): ...@@ -428,7 +437,7 @@ def format_data_partition(image_fpath, logger):
"-v", "-v",
"3", "3",
"-p", "-p",
"/fs:exfat /V:data /q /y", "/fs:exfat /V:{} /q /y".format(data_partition_label),
"-m", "-m",
target_dev, target_dev,
], ],
......
...@@ -34,4 +34,6 @@ hotspot_languages = [("en", u"English"), ("fr", u"Fran\xe7ais")] ...@@ -34,4 +34,6 @@ hotspot_languages = [("en", u"English"), ("fr", u"Fran\xe7ais")]
help_url = "https://github.com/kiwix/kiwix-hotspot/wiki/FAQ" help_url = "https://github.com/kiwix/kiwix-hotspot/wiki/FAQ"
etcher_url = "https://etcher.io/" etcher_url = "https://etcher.io/"
data_partition_label = "HSPOT_DATA"
VERSION = "devel" VERSION = "devel"
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment