1 // Copyright 2005-2009, Ecole des Mines de Nantes, University of Copenhagen
2 // Yoann Padioleau, Julia Lawall, Rene Rydhof Hansen, Henrik Stuart, Gilles Muller, Nicolas Palix
3 // This file is part of Coccinelle.
5 // Coccinelle is free software: you can redistribute it and/or modify
6 // it under the terms of the GNU General Public License as published by
7 // the Free Software Foundation, according to version 2 of the License.
9 // Coccinelle is distributed in the hope that it will be useful,
10 // but WITHOUT ANY WARRANTY; without even the implied warranty of
11 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 // GNU General Public License for more details.
14 // You should have received a copy of the GNU General Public License
15 // along with Coccinelle. If not, see <http://www.gnu.org/licenses/>.
17 // The authors reserve the right to distribute this or future versions of
18 // Coccinelle under other licenses.
23 local function proc_info_func;
25 sht.proc_info = proc_info_func;
28 identifier buffer, start, offset, length, inout, hostptr, hostno;
31 + struct Scsi_Host *hostptr,
32 char *buffer, char **start, off_t offset, int length,
36 - struct Scsi_Host *hostptr;
38 - hostptr = scsi_host_hn_get(hostno);
40 ?- if (!hostptr) { ... }
42 ?- scsi_host_put(hostptr);
52 \+- E->host_no == hostno