New API call iso_write_opts_set_iso_mbr_part_type()

This commit is contained in:
2017-02-27 09:59:34 +01:00
parent 094b3f7546
commit e66b9bfe0c
5 changed files with 67 additions and 10 deletions

View File

@ -1,7 +1,7 @@
/*
* Copyright (c) 2007 Vreixo Formoso
* Copyright (c) 2007 Mario Danic
* Copyright (c) 2009 - 2016 Thomas Schmitt
* Copyright (c) 2009 - 2017 Thomas Schmitt
*
* This file is part of the libisofs project; you can redistribute it and/or
* modify it under the terms of the GNU General Public License version 2
@ -3483,6 +3483,7 @@ int iso_write_opts_new(IsoWriteOpts **opts, int profile)
wopts->appended_as_gpt = 0;
wopts->appended_as_apm = 0;
wopts->part_like_isohybrid = 0;
wopts->iso_mbr_part_type = -1;
wopts->ascii_disc_label[0] = 0;
wopts->will_cancel = 0;
wopts->allow_dir_id_ext = 0;
@ -4218,6 +4219,14 @@ int iso_write_opts_set_part_like_isohybrid(IsoWriteOpts *opts, int alike)
return ISO_SUCCESS;
}
int iso_write_opts_set_iso_mbr_part_type(IsoWriteOpts *opts, int part_type)
{
if (part_type < -1 || part_type > 255)
part_type = -1;
opts->iso_mbr_part_type = part_type;
return ISO_SUCCESS;
}
int iso_write_opts_set_disc_label(IsoWriteOpts *opts, char *label)
{
strncpy(opts->ascii_disc_label, label, ISO_DISC_LABEL_SIZE - 1);