Date: Thu, 5 Sep 2013 10:14:17 -0500 (CDT) From: Bryan Venteicher <bryanv@daemoninthecloset.org> To: freebsd-scsi@freebsd.org Subject: camcontrol SCSI sanitize Message-ID: <1292769639.3059.1378394057334.JavaMail.root@daemoninthecloset.org> In-Reply-To: <1895443574.3014.1378393339664.JavaMail.root@daemoninthecloset.org>
next in thread | previous in thread | raw e-mail | index | archive | help
------=_Part_3057_1096540079.1378394057331 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Hi, Anybody with more SCSI experience than myself interested in reviewing the attached patch that adds SCSI sanitize support to camcontrol? It has been compiled tested on -current, but a very similar patch works on 8.x. The time is short, but I wouldn't mind sneaking this into 10 before the code freeze so I have one less local patch to deal with later. http://people.freebsd.org/~bryanv/patches/camcontrol_sanitize.diff Thanks. ------=_Part_3057_1096540079.1378394057331 Content-Type: text/x-patch; name=camcontrol_sanitize.patch Content-Disposition: attachment; filename=camcontrol_sanitize.patch Content-Transfer-Encoding: base64 Y29tbWl0IDk0ZjdjOGQxMWEzMjBlMzZmNTllZGI3N2ZjZTU5M2I2Yzg5MmFhM2MKQXV0aG9yOiBC cnlhbiBWZW50ZWljaGVyIDxicnlhbnZAZGFlbW9uaW50aGVjbG9zZXQub3JnPgpEYXRlOiAgIFRo dSBTZXAgNSAwMDoxNDowOCAyMDEzIC0wNTAwCgogICAgQWRkIGNhbWNvbnRyb2wgc2FuaXRpemUg c3VwcG9ydAoKZGlmZiAtLWdpdCBhL3NiaW4vY2FtY29udHJvbC9jYW1jb250cm9sLjggYi9zYmlu L2NhbWNvbnRyb2wvY2FtY29udHJvbC44CmluZGV4IGRmMGIzZTcuLjBhMmJlNjQgMTAwNjQ0Ci0t LSBhL3NiaW4vY2FtY29udHJvbC9jYW1jb250cm9sLjgKKysrIGIvc2Jpbi9jYW1jb250cm9sL2Nh bWNvbnRyb2wuOApAQCAtMjA3LDYgKzIwNywxOSBAQAogLk9wIEZsIHcKIC5PcCBGbCB5CiAuTm0K Ky5J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5pdGl6ZSAg IFtkZXZfaWRdW2dlbmVyaWMgYXJnc11cbiIKKyIgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICBbLWEgb3ZlcndyaXRlfGJsb2NrfGNyeXB0b3xleGl0ZmFpbHVyZV1cbiIKKyIgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICBbLWMgY291bnRdWy1QIGZpbGVdWy1JXVstVV1bLXFdWy1yXVst d11bLXldXG4iCiAjZW5kaWYgLyogTUlOSU1BTElTVElDICovCiAiICAgICAgICBjYW1jb250cm9s IGhlbHBcbiIpOwogCWlmICghcHJpbnRsb25nKQpAQCAtNzUzMiw2ICs3OTM1LDE2IEBAIHVzYWdl KGludCBwcmludGxvbmcpCiAiICAgICAgICAgICAgICAgICAgZGV2aWNlXG4iCiAiLVUgcHdkICAg ICAgICAgICAgdW5sb2NrIHRoZSBIUEEgY29uZmlndXJhdGlvbiBvZiB0aGUgZGV2aWNlXG4iCiAi LXkgICAgICAgICAgICAgICAgZG9uJ3QgYXNrIGFueSBxdWVzdGlvbnNcbiIKKyJzYW5pdGl6ZSBh cmd1bWVudHM6XG4iCisiLWEgYWN0aW9uICAgICAgICAgc2VydmljZSBhY3Rpb24gbW9kZSAob3Zl cndyaXRlLCBibG9jaywgY3J5cHRvIG9yIGV4aXRmYWlsdXJlKVxuIgorIi1jIGNvdW50ICAgICAg ICAgIG92ZXJ3cml0ZSBwYXNzZXMgcGVyZm9ybWVkICgxIHRvIDMxKVxuIgorIi1QIGZpbGUgICAg ICAgICAgIG92ZXJ3cml0ZSBpbml0aWFsaXphdGlvbiBwYXR0ZXJuXG4iCisiLUkgICAgICAgICAg ICAgICAgaW52ZXJ0IG92ZXJ3cml0ZSBwYXR0ZXJuIGFmdGVyIGVhY2ggcGFzc1xuIgorIi1VICAg ICAgICAgICAgICAgIHNldCB1bnJlc3RyaWN0ZWQgc2FuaXRpemUgZXhpdCAoQVVTRSkgYml0XG4i CisiLXEgICAgICAgICAgICAgICAgYmUgcXVpZX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7CisKICNlbmRpZiAvKiAhX0tF Uk5FTCAqLwogX19FTkRfREVDTFMKIAo= ------=_Part_3057_1096540079.1378394057331--
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?1292769639.3059.1378394057334.JavaMail.root>