[pbs-devel] [PATCH proxmox-backup v2 03/14] tape/drive: clippy fixes

Dietmar Maurer dietmar at proxmox.com
Mon Apr 19 11:35:20 CEST 2021


> > @@ -608,9 +606,9 @@ impl SgTape {
> >          }
> >  
> >          if let Some(buffer_mode) = buffer_mode {
> > -            let mut mode = head.flags3 & 0b1_000_1111;
> > +            let mut mode = head.flags3 & 0b1000_1111;

This is documented in the SCSI reference. Please do not change this! 

> ^ I really wish those bits were documented or `bitflags!`, because maybe the 1/3/4 grouping is based on meaning :S

yes, It has meaning

> But since it's not, I agree with this hunk ;-)
> 
> >              if buffer_mode {
> > -                mode |= 0b0_001_0000;
> > +                mode |= 0b0001_0000;


again , please do not change. Bits are grouped by meaning.





More information about the pbs-devel mailing list