mirror of
https://git.hardenedbsd.org/hardenedbsd/HardenedBSD.git
synced 2024-12-19 14:31:48 +01:00
Move some warn()'s into DEBUG space since I don't need them coming
out in my curses interfaces and spamming my screen.
This commit is contained in:
parent
ba034263ba
commit
d402093152
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=15441
@ -6,7 +6,7 @@
|
||||
* this stuff is worth it, you can buy me a beer in return. Poul-Henning Kamp
|
||||
* ----------------------------------------------------------------------------
|
||||
*
|
||||
* $Id: create_chunk.c,v 1.22 1995/12/07 10:33:20 peter Exp $
|
||||
* $Id: create_chunk.c,v 1.23 1996/03/24 18:55:37 joerg Exp $
|
||||
*
|
||||
*/
|
||||
|
||||
@ -221,7 +221,6 @@ Create_Chunk_DWIM(struct disk *d, struct chunk *parent , u_long size, chunk_e ty
|
||||
offset = c1->offset;
|
||||
goto found;
|
||||
}
|
||||
warn("Not enough unused space");
|
||||
return 0;
|
||||
found:
|
||||
if (parent->flags & CHUNK_BAD144) {
|
||||
@ -232,10 +231,8 @@ Create_Chunk_DWIM(struct disk *d, struct chunk *parent , u_long size, chunk_e ty
|
||||
size = edge - offset + 1;
|
||||
}
|
||||
i = Add_Chunk(d,offset,size,"X",type,subtype,flags);
|
||||
if (i) {
|
||||
warn("Didn't cut it");
|
||||
if (i)
|
||||
return 0;
|
||||
}
|
||||
Fixup_Names(d);
|
||||
for (c1=parent->part; c1 ; c1 = c1->next)
|
||||
if (c1->offset == offset)
|
||||
|
@ -6,7 +6,7 @@
|
||||
* this stuff is worth it, you can buy me a beer in return. Poul-Henning Kamp
|
||||
* ----------------------------------------------------------------------------
|
||||
*
|
||||
* $Id: disk.c,v 1.20 1995/06/11 19:29:34 rgrimes Exp $
|
||||
* $Id: disk.c,v 1.21 1996/03/24 18:55:37 joerg Exp $
|
||||
*
|
||||
*/
|
||||
|
||||
@ -64,7 +64,9 @@ Int_Open_Disk(const char *name, u_long size)
|
||||
|
||||
fd = open(device,O_RDONLY);
|
||||
if (fd < 0) {
|
||||
#ifdef DEBUG
|
||||
warn("open(%s) failed",device);
|
||||
#endif
|
||||
return 0;
|
||||
}
|
||||
|
||||
@ -72,7 +74,9 @@ Int_Open_Disk(const char *name, u_long size)
|
||||
ioctl(fd,DIOCGDINFO,&dl);
|
||||
i = ioctl(fd,DIOCGSLICEINFO,&ds);
|
||||
if (i < 0) {
|
||||
#ifdef DEBUG
|
||||
warn("DIOCGSLICEINFO(%s) failed",device);
|
||||
#endif
|
||||
close(fd);
|
||||
return 0;
|
||||
}
|
||||
@ -112,8 +116,12 @@ Int_Open_Disk(const char *name, u_long size)
|
||||
if (dl.d_ntracks && dl.d_nsectors)
|
||||
d->bios_cyl = size/(dl.d_ntracks*dl.d_nsectors);
|
||||
|
||||
if (Add_Chunk(d, -offset, size, name,whole,0,0))
|
||||
if (Add_Chunk(d, -offset, size, name, whole, 0, 0))
|
||||
#ifdef DEBUG
|
||||
warn("Failed to add 'whole' chunk");
|
||||
#else
|
||||
{}
|
||||
#endif
|
||||
|
||||
for(i=BASE_SLICE;i<ds.dss_nslices;i++) {
|
||||
char sname[20];
|
||||
@ -141,9 +149,13 @@ Int_Open_Disk(const char *name, u_long size)
|
||||
ce = unknown;
|
||||
break;
|
||||
}
|
||||
if (Add_Chunk(d,ds.dss_slices[i].ds_offset,
|
||||
ds.dss_slices[i].ds_size, sname,ce,subtype,flags))
|
||||
warn("failed to add chunk for slice %d",i - 1);
|
||||
if (Add_Chunk(d, ds.dss_slices[i].ds_offset,
|
||||
ds.dss_slices[i].ds_size, sname, ce, subtype, flags))
|
||||
#ifdef DEBUG
|
||||
warn("failed to add chunk for slice %d", i - 1);
|
||||
#else
|
||||
{}
|
||||
#endif
|
||||
|
||||
if (ds.dss_slices[i].ds_type != 0xa5)
|
||||
continue;
|
||||
@ -156,12 +168,16 @@ Int_Open_Disk(const char *name, u_long size)
|
||||
strcat(pname,sname);
|
||||
j = open(pname,O_RDONLY);
|
||||
if (j < 0) {
|
||||
#ifdef DEBUG
|
||||
warn("open(%s)",pname);
|
||||
#endif
|
||||
continue;
|
||||
}
|
||||
k = ioctl(j,DIOCGDINFO,&dl);
|
||||
if (k < 0) {
|
||||
#ifdef DEBUG
|
||||
warn("ioctl(%s,DIOCGDINFO)",pname);
|
||||
#endif
|
||||
close(j);
|
||||
continue;
|
||||
}
|
||||
@ -190,10 +206,14 @@ Int_Open_Disk(const char *name, u_long size)
|
||||
pname,part,
|
||||
dl.d_partitions[j].p_fstype,
|
||||
0) && j != 3)
|
||||
#ifdef DEBUG
|
||||
warn(
|
||||
"Failed to add chunk for partition %c [%lu,%lu]",
|
||||
j + 'a',dl.d_partitions[j].p_offset,
|
||||
dl.d_partitions[j].p_size);
|
||||
#else
|
||||
{}
|
||||
#endif
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -6,7 +6,7 @@
|
||||
* this stuff is worth it, you can buy me a beer in return. Poul-Henning Kamp
|
||||
* ----------------------------------------------------------------------------
|
||||
*
|
||||
* $Id: write_disk.c,v 1.15 1995/08/26 04:57:03 davidg Exp $
|
||||
* $Id: write_disk.c,v 1.16 1995/12/07 10:33:27 peter Exp $
|
||||
*
|
||||
*/
|
||||
|
||||
@ -58,7 +58,9 @@ Write_FreeBSD(int fd, struct disk *new, struct disk *old, struct chunk *c1)
|
||||
if (!strcmp(c2->name,"X")) continue;
|
||||
j = c2->name[5] - 'a';
|
||||
if (j < 0 || j >= MAXPARTITIONS || j == RAW_PART) {
|
||||
#ifdef DEBUG
|
||||
warn("Weird parititon letter %c",c2->name[5]);
|
||||
#endif
|
||||
continue;
|
||||
}
|
||||
dl->d_partitions[j].p_size = c2->size;
|
||||
@ -133,7 +135,9 @@ Write_Disk(struct disk *d1)
|
||||
|
||||
fd = open(device,O_RDWR);
|
||||
if (fd < 0) {
|
||||
#ifdef DEBUG
|
||||
warn("open(%s) failed",device);
|
||||
#endif
|
||||
return 1;
|
||||
}
|
||||
|
||||
@ -225,8 +229,10 @@ Write_Disk(struct disk *d1)
|
||||
|
||||
i = 1;
|
||||
i = ioctl(fd,DIOCSYNCSLICEINFO,&i);
|
||||
#ifdef DEBUG
|
||||
if (i != 0)
|
||||
warn("ioctl(DIOCSYNCSLICEINFO)");
|
||||
#endif
|
||||
close(fd);
|
||||
return 0;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user