logo       

Re: Reserve/Release functionality for iet: msg#00088

Subject: Re: Reserve/Release functionality for iet
On Tue, 2005-07-12 at 12:04 +0200, Libor Vanek wrote:
> jrauti@xxxxxx wrote:
> 
> >On Tue, 12 Jul 2005, Arne Redlich wrote:
> >
> >  
> >
> >>Am Dienstag, den 12.07.2005, 12:16 +0300 schrieb jrauti@xxxxxx:
> >>
> >>1.) multiple statements on single line, e.g.
> >>
> >>+int volume_reserve(struct iet_volume *volume, u64 sid)
> >>+{
> >>+       int err = 0;
> >>+       if (volume->reserve_sid == 0) volume->reserve_sid = sid;
> >>+       else if (volume->reserve_sid != sid) return err;
> >>+       return 1;
> >>+}
> >>    
> >>
> >
> >That I didn't pick up from document but it should've been obvious.
> > 
> >  
> >
> >>2.) whitespace vs. tab-indentation, e.g.
> >>
> >>+
> >>+        if (func(req) < 0)
> >>+                eprintk("%x\n", cmnd_opcode(req));
> >>+
> >>+       if (func(req) == 0) {
> >>+               rsp_hdr->cmd_status = SAM_STAT_RESERVATION_CONFLICT;
> >>+       }
> >>+        iscsi_cmnd_init_write(rsp);
> >>+}
> >>
> >>3.) additional whitespaces at end of lines, e.g.
> >>
> >>+static int build_reserve_response(struct iscsi_cmnd *cmnd)
> >>+{        <--------
> >>+       return volume_reserve(cmnd->lun, cmnd->conn->session->sid);
> >>+}
> >>    
> >>
> >
> >I'll try to clean it up.
> >  
> >
> Maybe I'm saying something what you already know, but do you know, you 
> can use "indent" to do this automatically?
> 
> I prefer using:
> 
> indent -kr -i8 -l100 file.c
is -l100 ok? :) i guess they only like -l80 or -l75

also i want a -sob which remove optional blank line.


> (please notice, that file.c is overwritten by new version! make backup 
> first!)
> 



-------------------------------------------------------
This SF.Net email is sponsored by the 'Do More With Dual!' webinar happening
July 14 at 8am PDT/11am EDT. We invite you to explore the latest in dual
core and dual graphics technology at this free one hour event hosted by HP, 
AMD, and NVIDIA.  To register visit http://www.hp.com/go/dualwebinar


<Prev in Thread] Current Thread [Next in Thread>