OpenSDE Packages Database (without history before r20070)
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

65 lines
2.1 KiB

  1. # --- SDE-COPYRIGHT-NOTE-BEGIN ---
  2. # This copyright note is auto-generated by ./scripts/Create-CopyPatch.
  3. #
  4. # Filename: package/.../linux-header/PATCHv2-2-4-scsi-make-scsi-scsi.h-headers_check-clean.patch
  5. # Copyright (C) 2009 The OpenSDE Project
  6. #
  7. # More information can be found in the files COPYING and README.
  8. #
  9. # This patch file is dual-licensed. It is available under the license the
  10. # patched project is licensed under, as long as it is an OpenSource license
  11. # as defined at http://www.opensource.org/ (e.g. BSD, X11) or under the terms
  12. # of the GNU General Public License as published by the Free Software
  13. # Foundation; either version 2 of the License, or (at your option) any later
  14. # version.
  15. # --- SDE-COPYRIGHT-NOTE-END ---
  16. From patchwork Tue Sep 29 10:34:19 2009
  17. Content-Type: text/plain; charset="utf-8"
  18. MIME-Version: 1.0
  19. Content-Transfer-Encoding: 7bit
  20. Subject: [PATCHv2,2/4] scsi: make scsi/scsi.h headers_check clean
  21. Date: Tue, 29 Sep 2009 10:34:19 -0000
  22. From: Michael S. Tsirkin <mst@redhat.com>
  23. X-Patchwork-Id: 50529
  24. place extern declarations in scsi/scsi.h within ifdef __KERNEL__
  25. so that make headers_install strips them out.
  26. Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
  27. ---
  28. include/scsi/scsi.h | 4 ++++
  29. 1 files changed, 4 insertions(+), 0 deletions(-)
  30. diff --git a/include/scsi/scsi.h b/include/scsi/scsi.h
  31. index dfcfaab..418465a 100644
  32. --- a/include/scsi/scsi.h
  33. +++ b/include/scsi/scsi.h
  34. @@ -150,6 +150,7 @@ struct scsi_varlen_cdb_hdr {
  35. /* service specific data follows */
  36. };
  37. +#ifdef __KERNEL__
  38. static inline unsigned
  39. scsi_varlen_cdb_length(const void *hdr)
  40. {
  41. @@ -165,6 +166,7 @@ scsi_command_size(const unsigned char *cmnd)
  42. return (cmnd[0] == VARIABLE_LENGTH_CMD) ?
  43. scsi_varlen_cdb_length(cmnd) : COMMAND_SIZE(cmnd[0]);
  44. }
  45. +#endif
  46. /*
  47. * SCSI Architecture Model (SAM) Status codes. Taken from SAM-3 draft
  48. @@ -281,8 +283,10 @@ enum scsi_protocol {
  49. SCSI_PROTOCOL_UNSPEC = 0xf, /* No specific protocol */
  50. };
  51. +#ifdef __KERNEL__
  52. /* Returns a human-readable name for the device */
  53. extern const char * scsi_device_type(unsigned type);
  54. +#endif
  55. /*
  56. * standard mode-select header prepended to all mode-select commands