View | Details | Raw Unified
Collapse All | Expand All

(-) ./Linux/Kernel/Dm-target.c.orig (-12 / +12 lines)
 Lines 161-167    Link Here 
		goto err;
		goto err;
	}
	}
	if (sscanf (argv[ARG_SEC], SECTOR_FORMAT, &tc->start) != 1)
	if (sscanf (argv[ARG_SEC], "%uL", &tc->start) != 1)
	{
	{
		ti->error = "truecrypt: Invalid device sector";
		ti->error = "truecrypt: Invalid device sector";
		goto err;
		goto err;
 Lines 224-237    Link Here 
	}
	}
	// Read-only start sector
	// Read-only start sector
	if (sscanf (argv[ARG_RO_START], SECTOR_FORMAT, &tc->read_only_start) != 1)
	if (sscanf (argv[ARG_RO_START], "%uL", &tc->read_only_start) != 1)
	{
	{
		ti->error = "truecrypt: Invalid read-only start sector";
		ti->error = "truecrypt: Invalid read-only start sector";
		goto err;
		goto err;
	}
	}
	// Read-only end sector
	// Read-only end sector
	if (sscanf (argv[ARG_RO_END], SECTOR_FORMAT, &tc->read_only_end) != 1)
	if (sscanf (argv[ARG_RO_END], "%uL", &tc->read_only_end) != 1)
	{
	{
		ti->error = "truecrypt: Invalid read-only end sector";
		ti->error = "truecrypt: Invalid read-only end sector";
		goto err;
		goto err;
 Lines 375-382    Link Here 
	int seg_no;
	int seg_no;
	
	
	trace (3, "truecrypt_endio (%p, %d, %d)\n", bio, bytes_done, error);
	trace (3, "truecrypt_endio (%p, %d, %d)\n", bio, bytes_done, error);
	trace (1, "end: sc=" SECTOR_FORMAT " fl=%ld rw=%ld sz=%d ix=%hd vc=%hd dn=%d er=%d\n",
	trace (1, "end: sc=%llu fl=%ld rw=%ld sz=%d ix=%hd vc=%hd dn=%d er=%d\n",
		bio->bi_sector, bio->bi_flags, bio->bi_rw, bio->bi_size, bio->bi_idx, bio->bi_vcnt, bytes_done, error);
		(unsigned long long) bio->bi_sector, bio->bi_flags, bio->bi_rw, bio->bi_size, bio->bi_idx, bio->bi_vcnt, bytes_done, error);
	if (error != 0)
	if (error != 0)
		bc->error = error;
		bc->error = error;
 Lines 420-427    Link Here 
	int seg_no;
	int seg_no;
	trace (3, "truecrypt_map (%p, %p, %p)\n", ti, bio, map_context);
	trace (3, "truecrypt_map (%p, %p, %p)\n", ti, bio, map_context);
	trace (1, "map: sc=" SECTOR_FORMAT " fl=%ld rw=%ld sz=%d ix=%hd vc=%hd\n",
	trace (1, "map: sc=%llu fl=%ld rw=%ld sz=%d ix=%hd vc=%hd\n",
		bio->bi_sector, bio->bi_flags, bio->bi_rw, bio->bi_size, bio->bi_idx, bio->bi_vcnt);
		(unsigned long long) bio->bi_sector, bio->bi_flags, bio->bi_rw, bio->bi_size, bio->bi_idx, bio->bi_vcnt);
	// Write protection
	// Write protection
	if (bio_data_dir (bio) == WRITE && READ_ONLY (tc))
	if (bio_data_dir (bio) == WRITE && READ_ONLY (tc))
 Lines 547-553    Link Here 
	atomic_inc (&bc->ref_count);
	atomic_inc (&bc->ref_count);
	trace (3, "generic_make_request (rw=%ld sc=" SECTOR_FORMAT ")\n", bion->bi_rw, bion->bi_sector);
	trace (3, "generic_make_request (rw=%ld sc=%llu )\n", bion->bi_rw,(unsigned long long) bion->bi_sector);
	generic_make_request (bion);
	generic_make_request (bion);
	dereference_bio_ctx (bc);
	dereference_bio_ctx (bc);
 Lines 569-581    Link Here 
		{
		{
			char name[32];
			char name[32];
			format_dev_t (name, tc->dev->bdev->bd_dev);
			format_dev_t (name, tc->dev->bdev->bd_dev);
			snprintf (result, maxlen, "%d %d 0 0 %s " SECTOR_FORMAT " " SECTOR_FORMAT " " SECTOR_FORMAT " %Ld %Ld %d %s",
			snprintf (result, maxlen, "%d %d 0 0 %s %llu %llu %llu %Ld %Ld %d %s",
				tc->ci->ea,
				tc->ci->ea,
				tc->ci->mode,
				tc->ci->mode,
				name,
				name,
				tc->start,
				(unsigned long long) tc->start,
				tc->read_only_start,
				(unsigned long long) tc->read_only_start,
				tc->read_only_end,
				(unsigned long long) tc->read_only_end,
				tc->mtime,
				tc->mtime,
				tc->atime,
				tc->atime,
				tc->flags,
				tc->flags,