diff options
author | Android Build Coastguard Worker <android-build-coastguard-worker@google.com> | 2022-05-10 06:58:32 +0000 |
---|---|---|
committer | Android Build Coastguard Worker <android-build-coastguard-worker@google.com> | 2022-05-10 06:58:32 +0000 |
commit | b8024d500c044d67c118af3da2e21965439ee93d (patch) | |
tree | f80bdc436a4e35ebc8c7e05323eab88254845f0c /old_dos.h | |
parent | 27a3162cec63ff11ceabab0a4c78c526013de305 (diff) | |
parent | 67803003190004a55215c16fe9905dbaac1cfe74 (diff) | |
download | mtools-b8024d500c044d67c118af3da2e21965439ee93d.tar.gz |
Snap for 8564071 from 67803003190004a55215c16fe9905dbaac1cfe74 to mainline-extservices-releaseaml_ext_331814220aml_ext_331412000aml_ext_331312000aml_ext_331112010aml_ext_331012020android13-mainline-extservices-release
Change-Id: Id4e3c3e6e527c8d4b652a3458bc7aa7e91235c16
Diffstat (limited to 'old_dos.h')
-rw-r--r-- | old_dos.h | 43 |
1 files changed, 43 insertions, 0 deletions
diff --git a/old_dos.h b/old_dos.h new file mode 100644 index 0000000..2461807 --- /dev/null +++ b/old_dos.h @@ -0,0 +1,43 @@ +#ifndef MTOOLS_OLDDOS_H +#define MTOOLS_OLDDOS_H +/* Copyright 2021 Alain Knaff. + * This file is part of mtools. + * + * Mtools is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * Mtools is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with Mtools. If not, see <http://www.gnu.org/licenses/>. + */ + +#include "device.h" + +struct OldDos_t { + unsigned int tracks; + uint16_t sectors; + uint16_t heads; + + uint16_t dir_len; + uint8_t cluster_size; + uint32_t fat_len; + + uint8_t media; +}; + +extern struct OldDos_t *getOldDosBySize(size_t size); +extern struct OldDos_t *getOldDosByMedia(int media); +extern struct OldDos_t *getOldDosByParams(unsigned int tracks, + unsigned int heads, + unsigned int sectors, + unsigned int dir_len, + unsigned int cluster_size); +int setDeviceFromOldDos(int media, struct device *dev); + +#endif |