~ubuntu-branches/ubuntu/trusty/xfsdump/trusty-proposed

« back to all changes in this revision

Viewing changes to common/mlog.c

  • Committer: Bazaar Package Importer
  • Author(s): Anibal Monsalve Salazar
  • Date: 2008-04-23 22:06:34 UTC
  • mfrom: (0.1.1 upstream) (3.1.1 gutsy)
  • Revision ID: james.westby@ubuntu.com-20080423220634-7m8953nknbpz1nsv
Tags: 2.2.48-1
* New upstream release
* xfsdump depends on ${misc:Depends}
* Add debian/watch
* Add homepage control header
* Fix the following lintian issues:
  W: xfsdump source: package-uses-deprecated-debhelper-compat-version 1
  W: xfsdump source: ancient-standards-version 3.5.9 (current is 3.7.3)

Show diffs side-by-side

added added

removed removed

Lines of Context:
118
118
static rv_t mlog_main_exit_return = RV_NONE;
119
119
static rv_t mlog_main_exit_hint = RV_NONE;
120
120
 
 
121
void
 
122
mlog_init0( void )
 
123
{
 
124
        int i;
 
125
 
 
126
#ifdef DUMP
 
127
        mlog_fp = stderr;
 
128
#endif /* DUMP */
 
129
#ifdef RESTORE
 
130
        mlog_fp = stdout;
 
131
#endif /* RESTORE */
 
132
 
 
133
        /* initialize stream count. will be updated later by call to
 
134
         * mlog_tell_streamcnt( ), after drive layer has counted drives
 
135
         */
 
136
        mlog_streamcnt = 1;
 
137
 
 
138
        for( i = 0 ; i < MLOG_SS_CNT ; i++ ) {
 
139
                mlog_level_ss[ i ] = MLOG_VERBOSE;
 
140
        }
 
141
}
 
142
 
121
143
bool_t
122
144
mlog_init1( intgen_t argc, char *argv[ ] )
123
145
{
127
149
        size_t vsymcnt;
128
150
        intgen_t c;
129
151
 
130
 
#ifdef DUMP
131
 
        mlog_fp = stderr;
132
 
#endif /* DUMP */
133
 
#ifdef RESTORE
134
 
        mlog_fp = stdout;
135
 
#endif /* RESTORE */
136
 
 
137
 
        /* initialize stream count. will be updated later by call to
138
 
         * mlog_tell_streamcnt( ), after drive layer has counted drives
139
 
         */
140
 
        mlog_streamcnt = 1;
141
 
 
142
152
        /* prepare an array of suboption token strings. this will be the
143
153
         * concatenation of the subsystem names with the verbosity symbols.
144
154
         * this array of char pts must be null terminated for getsubopt( 3 ).
179
189
                                fprintf( stderr,
180
190
                                         _("%s: -%c argument missing\n"),
181
191
                                         progname,
182
 
                                         optopt );
 
192
                                         c );
183
193
                                usage( );
184
194
                                return BOOL_FALSE;
185
195
                        }
195
205
                                        fprintf( stderr,
196
206
                                                 _("%s: -%c argument invalid\n"),
197
207
                                                 progname,
198
 
                                                 optopt );
 
208
                                                 c );
199
209
                                        usage( );
200
210
                                        return BOOL_FALSE;
201
211
                                }
210
220
                                                         "%s requires a "
211
221
                                                         "verbosity value\n"),
212
222
                                                         progname,
213
 
                                                         optopt,
 
223
                                                         c,
214
224
                                                mlog_ss_names[ suboptix ] );
215
225
                                                usage( );
216
226
                                                return BOOL_FALSE;
225
235
                                                         "does not require "
226
236
                                                         "a value\n"),
227
237
                                                         progname,
228
 
                                                         optopt );
 
238
                                                         c );
229
239
                                                usage( );
230
240
                                                return BOOL_FALSE;
231
241
                                        }
238
248
                                                 _("%s: -%c argument "
239
249
                                                 "invalid\n"),
240
250
                                                 progname,
241
 
                                                 optopt );
 
251
                                                 c );
242
252
                                        usage( );
243
253
                                        return BOOL_FALSE;
244
254
                                }