~kris/9p

9hist

28e045cb621c105f983b8bbed66988a985dd6057 — David du Colombier 31 years ago f159630
Plan 9 from Bell Labs 1995-02-18
2 files changed, 8 insertions(+), 4 deletions(-)

M pc/devfloppy.c
M port/pgrp.c
M pc/devfloppy.c => pc/devfloppy.c +7 -3
@@ 232,12 232,13 @@ setdef(Drive *dp)
{
	Type *t;

	for(t = floppytype; t < &floppytype[NTYPES]; t++)
	for(t = floppytype; t < &floppytype[NTYPES]; t++){
		if(dp->dt == t->dt){
			dp->t = t;
			floppydir[NFDIR*dp->dev].length = dp->t->cap;
			break;
			return;
		}
	}
}

void


@@ 1043,12 1044,15 @@ floppyformat(Drive *dp, char *params)
	 *  set the type
	 */
	if(getfields(params, f, 3, " ") > 1){
		for(t = floppytype; t < &floppytype[NTYPES]; t++)
		for(t = floppytype; t < &floppytype[NTYPES]; t++){
			if(strcmp(f[1], t->name)==0 && t->dt==dp->dt){
				dp->t = t;
				floppydir[NFDIR*dp->dev].length = dp->t->cap;
				break;
			}
		}
		if(t >= &floppytype[NTYPES])
			error(Ebadarg);
	} else {
		setdef(dp);
		t = dp->t;

M port/pgrp.c => port/pgrp.c +1 -1
@@ 24,7 24,7 @@ pgrpnote(ulong noteid, char *a, long n, int flag)
	for(; p < ep; p++) {
		if(p->state == Dead)
			continue;
		if(p->noteid == noteid && p->kp == 0) {
		if(up != p && p->noteid == noteid && p->kp == 0) {
			qlock(&p->debug);
			if(p->pid == 0 || p->noteid != noteid){
				qunlock(&p->debug);