亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? fipsspec.cpp

?? Unix操作系統minix 2.0源碼
?? CPP
字號:
/*

	FIPS - the First nondestructive Interactive Partition Splitting program



	Module fipsspec.cpp



	RCS - Header:

	$Header: c:/daten/fips/source/main/RCS/fipsspec.cpp 1.4 1995/01/19 00:00:53 schaefer Exp schaefer $



	Copyright (C) 1993 Arno Schaefer



	This program 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 2 of the License, or

	(at your option) any later version.



	This program 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 this program; if not, write to the Free Software

	Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.





	Report problems and direct all questions to:



	schaefer@rbg.informatik.th-darmstadt.de

*/



#include <dos.h>



#include "fipsspec.h"

#include "global.h"

#include "input.h"



#define FIRST_CHECK false

#define FINAL_CHECK true



#define DISK_INT 0x13



#define RESET_DISK 0

#define GET_DRIVE_PARAMS 8



void fips_bpb::print (void)

{

	printx ("Bytes per sector: %u\n",bytes_per_sector);

	printx ("Sectors per cluster: %u\n",sectors_per_cluster);

	printx ("Reserved sectors: %u\n",reserved_sectors);

	printx ("Number of FATs: %u\n",no_of_fats);

	printx ("Number of rootdirectory entries: %u\n",no_of_rootdir_entries);

	printx ("Number of sectors (short): %u\n",no_of_sectors);

	printx ("Media descriptor byte: %02Xh\n",media_descriptor);

	printx ("Sectors per FAT: %u\n",sectors_per_fat);

	printx ("Sectors per track: %u\n",sectors_per_track);

	printx ("Drive heads: %u\n",drive_heads);

	printx ("Hidden sectors: %lu\n",hidden_sectors);

	printx ("Number of sectors (long): %lu\n",no_of_sectors_long);

	printx ("Physical drive number: %02Xh\n",phys_drive_no);

	printx ("Signature: %02Xh\n\n",signature);

}



void fips_partition_table::print (void)

{

	printx ("     |        |     Start      |      |      End       | Start  |Number of|\n");

	printx ("Part.|bootable|Head Cyl. Sector|System|Head Cyl. Sector| Sector |Sectors  |  MB\n");

	printx ("-----+--------+----------------+------+----------------+--------+---------+----\n");

	for (int i=0;i<4;i++)

	{

		printx ("%u    |    %s |%4u %4u   %4u|   %02Xh|%4u %4u   %4u|%8lu| %8lu|%4lu\n",i+1,

		partition_info[i].bootable ? "yes" : " no",

		partition_info[i].start_head,partition_info[i].start_cylinder,partition_info[i].start_sector,

		partition_info[i].system,partition_info[i].end_head,partition_info[i].end_cylinder,partition_info[i].end_sector,

		partition_info[i].start_sector_abs,partition_info[i].no_of_sectors_abs,partition_info[i].no_of_sectors_abs / 2048);

	}

}



void fips_harddrive::get_geometry (void)

{

	union REGS regs;



	regs.h.ah = GET_DRIVE_PARAMS;

	regs.h.dl = number;

	int86 (DISK_INT,&regs,&regs);

	if (global.debug_mode)

	{

		fprintf (global.debugfile,"\nRegisters after call to int 13h 08h (drive %02Xh):\n\n",number);

		fprintf (global.debugfile,"   00       sc/cl    hd\n");

		fprintf (global.debugfile,"al ah bl bh cl ch dl dh   si    di    cflgs flags\n");

		hexwrite ((byte *) &regs,16,global.debugfile);

	}

	if ((errorcode = regs.h.ah) != 0) return;

	geometry.heads = (dword) regs.h.dh + 1;

	geometry.sectors = (dword) regs.h.cl & 0x3f;

	geometry.cylinders = ((dword) regs.h.ch | (((dword) regs.h.cl << 2) & 0x300)) + 1;



	if (global.debug_mode)

	{

		fprintf (global.debugfile, "\nGeometry reported by BIOS:\n");

		fprintf

		(

			global.debugfile,

			"%ld cylinders, %ld heads, %ld sectors\n",

			geometry.cylinders,

			geometry.heads,

			geometry.sectors

		);

	}

}



void fips_harddrive::reset (void)

{

	union REGS regs;



	regs.h.ah = RESET_DISK;

	regs.h.dl = number;

	int86 (DISK_INT,&regs,&regs);

	if (global.debug_mode)

	{

		fprintf (global.debugfile,"\nRegisters after call to int 13h 00h (drive %02Xh):\n\n",number);

		fprintf (global.debugfile,"al ah bl bh cl ch dl dh   si    di    cflgs flags\n");

		hexwrite ((byte *) &regs,16,global.debugfile);

	}

	errorcode = regs.h.ah;

}



void fips_logdrive_info::put_debug_info (void)

{

	fprintf (global.debugfile,"Calculated Partition Characteristica:\n\n");

	fprintf (global.debugfile,"Start of FAT 1: %lu\n",start_fat1);

	fprintf (global.debugfile,"Start of FAT 2: %lu\n",start_fat2);

	fprintf (global.debugfile,"Start of Rootdirectory: %lu\n",start_rootdir);

	fprintf (global.debugfile,"Start of Data: %lu\n",start_data);

	fprintf (global.debugfile,"Number of Clusters: %lu\n",no_of_clusters);

}



dword fips_partition::min_cylinder (fat16 fat, drive_geometry geometry)

{

	dword new_part_min_sector =

		info().start_data

		+ (dword) 4085

		* bpb().sectors_per_cluster;



	dword new_part_min_cylinder =

		(

			new_part_min_sector

			+ partition_info->start_sector_abs

			- 1

		)

		/ (geometry.heads * geometry.sectors)

		+ 1;



	if (new_part_min_cylinder > partition_info->end_cylinder)

		error ("Partition too small - can't split");



	dword min_free_cluster = fat.min_free_cluster ();

	dword min_free_sector =

		info().start_data

		+ (min_free_cluster - 2)

		* (dword) bpb().sectors_per_cluster;



	dword min_free_cylinder =

		(

			min_free_sector

			+ partition_info->start_sector_abs

			- 1

		)

		/ (geometry.heads * geometry.sectors)

		+ 1;



	if (min_free_cylinder > partition_info->end_cylinder)

		error ("Last cylinder is not free");



	if (new_part_min_cylinder < min_free_cylinder)

		new_part_min_cylinder = min_free_cylinder;



	return (new_part_min_cylinder);

}





boolean fips_partition::split (fips_harddrive hd)

{

	if (read_boot_sector ())

		error ("Error reading boot sector");



	if (global.debug_mode)

	{

		fprintf

		(

			global.debugfile,

			"\nBoot sector drive %02Xh, partition %u:\n\n",

			hd.number,

			number + 1

		);



		hexwrite

		(

			boot_sector->data,

			512,

			global.debugfile

		);

	}



	get_bpb ();



	printx ("\nBoot sector:\n\n");

	print_bpb ();



	get_info ();

	if (global.debug_mode)

		write_info_debugfile ();



	check ();



	fat16 fat1 (this,1);

	fat16 fat2 (this,2);



	fat1.check_against (&fat2);



	dword new_part_min_cylinder =

		min_cylinder (fat2, hd.geometry);



	if (ask_if_save()) save_root_and_boot(&hd,this);



	dword new_start_cylinder =

		ask_for_new_start_cylinder

		(

			partition_info->start_cylinder,

			new_part_min_cylinder,

			partition_info->end_cylinder,

			hd.geometry.heads * hd.geometry.sectors

		);



	fat2.check_empty

	(

		new_start_cylinder

			* hd.geometry.heads

			* hd.geometry.sectors

		- partition_info->start_sector_abs

	);



	hd.calculate_new_root (new_start_cylinder, this);



	hd.put_partition_table();

	hd.get_partition_table();



	printx ("\nNew partition table:\n\n");

	hd.print_partition_table ();



	hd.check (FINAL_CHECK);



	if (ask_if_continue () == false)

	{

		return (false);

	}



	calculate_new_boot ();



	put_bpb ();

	get_bpb ();



	printx ("\nNew boot sector:\n\n");

	print_bpb ();



	get_info ();

	if (global.debug_mode)

		write_info_debugfile ();



	check();



	if (!global.test_mode)

	{

		ask_for_write_permission ();



		if (hd.write_root_sector ())

			error ("Error writing root sector");



		if (write_boot_sector ())

			error ("Error writing boot sector");



		printx ("Repartitioning complete\n");

	}



	return (true);

}

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
精品一区二区在线观看| 在线欧美一区二区| 91理论电影在线观看| 91精品国产综合久久福利软件 | 国产日韩高清在线| 亚洲男人天堂av网| 国产老妇另类xxxxx| 91精品福利视频| 国产精品久久久久一区| 久久精品国产精品亚洲红杏| 91亚洲精品久久久蜜桃| 亚洲精品在线三区| 日韩精品电影一区亚洲| 一本到高清视频免费精品| 国产视频视频一区| 美国av一区二区| 欧美日韩国产不卡| 亚洲人成网站影音先锋播放| 国产白丝精品91爽爽久久 | 欧美在线|欧美| 亚洲国产精品ⅴa在线观看| 麻豆91小视频| 69av一区二区三区| 亚洲一区av在线| 色综合一个色综合亚洲| 国产精品私人自拍| 国产成人精品免费网站| 久久久亚洲欧洲日产国码αv| 日本aⅴ亚洲精品中文乱码| 欧美日韩一区二区三区视频| 一区二区在线观看免费视频播放| www.色精品| 亚洲天堂免费看| 色一情一伦一子一伦一区| 亚洲色图自拍偷拍美腿丝袜制服诱惑麻豆 | 色综合中文字幕国产 | 成人av手机在线观看| 中文字幕免费不卡| heyzo一本久久综合| 国产亲近乱来精品视频 | www.亚洲激情.com| 中文字幕五月欧美| 99国产精品久久| 亚洲自拍偷拍网站| 欧美日韩免费在线视频| 午夜精品爽啪视频| 欧美高清激情brazzers| 久久福利视频一区二区| 久久久久久久国产精品影院| 成人精品国产福利| 亚洲免费在线观看| 69堂成人精品免费视频| 另类小说欧美激情| 国产精品三级久久久久三级| 色综合中文字幕| 日本少妇一区二区| 亚洲国产精品国自产拍av| 99麻豆久久久国产精品免费| 亚洲国产日日夜夜| 日韩欧美国产小视频| av资源网一区| 天天色天天爱天天射综合| 久久伊99综合婷婷久久伊| 成人av电影在线播放| 亚洲成a人片综合在线| 久久久久国产免费免费 | 国产不卡在线一区| 亚洲一区二区视频在线观看| 日韩精品中文字幕在线不卡尤物| 国产高清亚洲一区| 亚洲一区二区高清| 欧美极品少妇xxxxⅹ高跟鞋 | 91丨九色丨国产丨porny| 偷拍亚洲欧洲综合| 日本一区二区三区在线不卡 | 亚洲国产精品成人综合色在线婷婷 | 91精品国产一区二区三区| 国产精品911| 成人国产免费视频| 亚洲第一在线综合网站| 国产午夜精品福利| 欧美日韩亚州综合| 97久久久精品综合88久久| 日韩电影一区二区三区| 日韩毛片精品高清免费| 精品不卡在线视频| 欧美日韩在线亚洲一区蜜芽| 成人免费毛片片v| 久久99精品久久久久| 亚洲国产婷婷综合在线精品| 国产精品嫩草久久久久| 日韩视频免费观看高清完整版 | 欧美xxxxxxxxx| 一本色道久久综合亚洲91| 国产一区二区精品久久99| 亚洲福利视频三区| ...xxx性欧美| 久久久久久97三级| 日韩精品资源二区在线| 欧美嫩在线观看| 在线视频一区二区三| av亚洲精华国产精华| 韩国欧美国产一区| 麻豆精品在线观看| 日韩电影免费一区| 天天综合日日夜夜精品| 亚洲精品免费在线| 亚洲精品日日夜夜| 亚洲久草在线视频| 亚洲婷婷国产精品电影人久久| 国产女人18水真多18精品一级做| 26uuu国产日韩综合| 久久在线免费观看| 久久久久久一二三区| 久久夜色精品国产欧美乱极品| 欧美sm美女调教| 欧美电影免费观看高清完整版在| 欧美一区二区三区婷婷月色| 日韩欧美自拍偷拍| 日韩精品中文字幕在线不卡尤物| 精品久久久久久久人人人人传媒 | 亚洲国产精品激情在线观看| 中文一区二区在线观看| 中文字幕av一区二区三区免费看| 国产欧美综合在线观看第十页| 国产日产欧美一区二区视频| 国产色91在线| 亚洲色图欧美偷拍| 亚洲日本在线天堂| 亚洲一区二区五区| 免费成人美女在线观看.| 狠狠色狠狠色合久久伊人| 国产一区啦啦啦在线观看| 国产美女精品人人做人人爽| 大胆亚洲人体视频| 日本高清不卡在线观看| 91精品国产色综合久久ai换脸| 26uuu精品一区二区| 中文字幕一区二区三区视频| 一区二区三区四区视频精品免费| 亚洲高清免费观看高清完整版在线观看| 日韩电影在线一区二区| 国产一区不卡在线| av中文字幕亚洲| 日韩一区二区在线观看| 久久久精品天堂| 亚洲精品免费看| 韩日av一区二区| 在线观看一区不卡| 日韩精品一区在线观看| 中文字幕免费在线观看视频一区| 亚洲国产精品一区二区www在线| 麻豆精品精品国产自在97香蕉| 成人免费视频视频| 91麻豆精品国产综合久久久久久 | 精品精品欲导航| 国产精品美女一区二区三区| 日韩有码一区二区三区| 国产高清久久久| 在线不卡的av| 国产精品国产三级国产有无不卡| 偷窥少妇高潮呻吟av久久免费| 高清av一区二区| 欧美一区欧美二区| 亚洲乱码国产乱码精品精98午夜 | 91高清视频免费看| 久久久国际精品| 五月天欧美精品| 91免费在线视频观看| 精品久久99ma| 日韩电影免费在线| 91豆麻精品91久久久久久| 久久久久成人黄色影片| 婷婷开心久久网| 欧美亚洲禁片免费| 18涩涩午夜精品.www| 国产黑丝在线一区二区三区| 日韩欧美电影一二三| 偷窥少妇高潮呻吟av久久免费| 99久久久国产精品免费蜜臀| 久久久另类综合| 国产一区二区不卡在线| 91精品福利在线一区二区三区| 亚洲地区一二三色| 91高清在线观看| 亚洲视频 欧洲视频| 99国产精品久久久久久久久久 | 美腿丝袜在线亚洲一区| 欧美四级电影在线观看| 亚洲精品视频在线观看网站| av日韩在线网站| 国产日韩影视精品| 精品一区二区免费视频| 欧美mv和日韩mv国产网站| 日精品一区二区三区| 欧美色爱综合网| 香蕉久久一区二区不卡无毒影院| 欧美人伦禁忌dvd放荡欲情| 亚洲一区二区三区视频在线| 欧洲一区在线电影|