
81 Cal.App.2d 616 (1947)
JOHN HENNESSY, Petitioner,
v.
H. P. GLEASON, as Sheriff, etc., et al., Respondents.
California Court of Appeals. 
Sept. 30, 1947.
 F. H. Dam for Petitioner.
 Nathan G. Gray, Ralph E. Hoyt and J. F. Coakley, District Attorneys, Richard H. Chamberlain, Chief Assistant Attorney, R. Robert Hunter, Assistant District Attorney, and Richard H. Klippert, Deputy District Attorney, for Respondents.
 BRAY, J.
 P. W. Harms, plaintiff in the original action, owns an office building in Berkeley. For some time he has rented rooms on the second and third floors for living quarters. *618 Petitioner for several years past was a month-to-month tenant of room 22, which he used for living and sleeping purposes. About December 30, 1946, plaintiff received a letter from the City Manager of Berkeley stating that plaintiff was operating a hotel in violation of state and local laws, and ordering him immediately to "vacate the second and third floors of the entire ... building for any living or sleeping purposes." Thereafter plaintiff caused a notice to vacate to be served upon petitioner, and upon his failure to do so, filed suit in unlawful detainer in the Justice's Court of the City of Berkeley. That court, after a trial, rendered judgment against petitioner for restoration of the premises and damages in the sum of $88.40. Petitioner thereupon appealed to the superior court on questions of both law and fact. There, after a trial de novo, the superior court rendered its judgment for restitution of the premises, for damages in the sum of $60, and for $18.50 costs, and ordered a writ of possession to issue, directed to the Sheriff of the County of Alameda.
 Thereupon, petitioner applied to this court for a writ of prohibition to prohibit the respondent sheriff from executing said writ, and the respondent court from proceeding further in the matter, and has asked this court, in case petitioner has mistaken his remedy, to grant such relief as may be proper.
 His contention is that the judgment of the superior court is void because it exceeded its jurisdiction, for the following alleged reasons:
 1. No three-day notice to quit was given defendant before suit filed.
 2. No proof of compliance by plaintiff with federal statutes and regulations.
 3. The court awarded costs to plaintiff instead of to petitioner.
 4. Excessive damages granted.
 5. Complaint did not state cause of action.
 All respondents have filed general demurrers to the petition. The respondent sheriff also answered.
 [1] Petitioner, on argument, concedes that prohibition will not lie against the sheriff as he is a ministerial and not a judicial officer (23 Cal.Jur. 294,  7; Code Civ. Proc.,  1102; Hobart v. Tillson, 66 Cal. 210 [5 P. 83]) or against the superior court or the judge thereof as the court and judge have already acted and there are no further judicial acts to be *619 performed (Big Jim Mines, Inc. v. Superior Court, 9 Cal.2d 503 [71 P.2d 67]; Duke v. Justice's Court, 42 Cal.App.2d 178 [108 P.2d 707]). However, if he is entitled to any relief, this court will not deny it to him because he has mistaken his remedy. Certiorari would be the proper remedy, if the superior court, in its trial de novo, exceeded its jurisdiction. (Redlands etc. School Dist. v. Superior Court, 20 Cal.2d 348 [125 P.2d 490].) An examination of the points raised by petitioner shows that the court did not exceed its jurisdiction.
 1. No Three-Day Notice Required.
 [2] It is conceded that no notice to the tenant was given other than the 30-day notice heretofore mentioned. Assuming, but expressly not deciding, that if a three-day notice was required, the failure to give such notice would be jurisdictional in the sense required here, we find no requirement for such notice. The notice given by plaintiff to defendant notified the latter that the plaintiff sought in good faith not to offer the premises for rent again for living or sleeping purposes, and notified the defendant to vacate within one month from service of the notice. It further called attention to the letter of the Berkeley City Manager, a copy of which was annexed. While the form of the notice might be improved upon, it obviously was a notice terminating the month-to-month tenancy which had theretofore existed. As said in La Cava v. Breedlove, 77 Cal.App.2d 129, 132 [174 P.2d 880]: "Appellants' contention that the trial court was without jurisdiction to try the instant case because no three-day notice to quit the premises had ever been served upon defendants is without merit and has been satisfactorily answered in Palmer v. Zeis (1944), 65 Cal.App.2d Supp. 859 [151 P.2d 323]. Section 791 of the Civil Code provides that no three-day notice is necessary 'where the hiring of real property is for a term not specified by the parties and where such hiring was terminated under and in accordance with the provisions of section 1946 of the Civil Code.' This latter section provides that unless the rental agreement itself provides for a shorter notice period, a month to month tenancy may be terminated by a month's notice. Thereafter, an unlawful detainer action may be maintained under subdivision (1) of section 1161, Code of Civil Procedure, without the necessity of first serving an additional three-day notice. (Palmer v. Zeis, supra.)" *620
 Petitioner has cited Martin v. Splivalo, 56 Cal. 128, Wagner v. Havard, 87 Cal.App. 310 [262 P. 47], and Ivory v. Brown, 137 Cal. 603 [70 P. 657], as requiring the three-day notice to be given. All of these cases, however, were decided prior to the amendment of section 791 of the Civil Code in 1931, eliminating this requirement. The Martin and Wagner cases were specifically referred to in Palmer v. Zeis, 65 Cal.App.2d Supp. 859 [151 P.2d 323], as being decided prior to the amendment. Colyear v. Tobriner, 7 Cal.2d 735 [62 P.2d 741, 109 A.L.R. 191], and Dorn v. Oppenheim, 45 Cal.App. 312 [187 P. 462], are quoted as holding that a notice to vacate under section 789 of the Civil Code is different from a notice terminating tenancy under section 1946 of the Civil Code. Whether the notice given here comes under either or both of these sections, there is no requirement of an additional three-day notice.
 2. No Proof of Compliance with Federal Statutes and Regulations.
 [3] Petitioner states that the applicable statutes are Emergency Price Control Act of 1942, 56 U.S. Stats. 23; Stabilization Extension Act of 1944, 58 U.S. Stats. 632; Public Law 129, 80th Congress, chapter 163, first session H. R. 3203, section 209. Petitioner points to no requirement of the statutes with which plaintiff should have complied. However, on argument he contended that certain regulations of the O.P.A. concerning housing would apply. But the premises involved here do not come within the term "housing." The O.P.A. regulations that apply are those set forth in section 1388.1231, Rent Regulation for Hotels and Rooming Houses. [4] Under subsection 6(a) 5 of this regulation, a landlord may remove a tenant of a hotel or rooming house if the landlord "seeks in good faith not to offer the room for rent" for living purposes. In such case the only notice required by the regulations to be given is provided in subsection 6(c), "At the time of commencing any action to remove or evict a tenant ... the landlord shall give written notice thereof to the Area Rent Office stating the title and number of the case, the court in which it is filed, the name and address of the tenant and the grounds on which eviction is sought." (Emphasis added.) Admittedly this notice was not given.
 Subsection 13, subdivision 14, states that a rooming house includes a building or portion thereof, other than a hotel, in *621 which a furnished room or rooms not constituting an apartment are rented on a short- time basis of daily, weekly or monthly occupancy to more than two tenants not members of the landlord's immediate family. A hotel is defined in subdivision 13 as "any establishment generally recognized as such in its community, containing more than 50 rooms and used predominantly for transient occupancy." The court by its judgment impliedly found that the premises involved here came within the designation of rooming house, as plaintiff's testimony shows he did not operate a hotel.
 Plaintiff set forth in his notice, in his complaint (although perhaps imperfectly as discussed hereafter), proved at the trial, and the court found that plaintiff in good faith sought not to offer the room again for living purposes.
 At argument, counsel for petitioner made some contention that the premises came neither within the designation of housing, hotel or rooming house, but was an office building. Of course, there are no O.P.A. regulations applying to office buildings.
 The only matter of any seriousness on this point is whether the failure to give the Area Rent Office a notice of the pendency of this action as required by subsection 6(c) was jurisdictional. It could not be jurisdictional as to the filing of the action, for its language "At the time of commencing any action" and its requirement that the notice give the title and number of the case precludes any possibility of such notice being a prerequisite to the filing of the suit. Petitioner has cited no case holding that the failure to give a notice of this type, which is not prerequisite to the filing of the action, is jurisdictional. Bauer v. Neuzel, 66 Cal.App.2d Supp. 1020 [152 P.2d 47], holds that to state a cause of action for the eviction of a tenant from a dwelling compliance with the rent regulations for housing must be alleged. But, as pointed out above, no such requirement exists, nor could exist in connection with a notice to be given after the complaint is filed.
 The regulations provide no penalty for failing to give the notice of pendency of the action, nor do they provide for any action that can be taken by the O.P.A. on receiving such notice. It is obvious that such notice cannot be jurisdictional in a proceeding of this character. At most, it is of the type of requirement which was held in Redlands etc. School Dist. v. Superior Court, supra (20 Cal.2d 348), as *622 not being restrictive of the power of the courts. In the Redlands case the plaintiff in an action against a school district for damages for personal injuries received by a pupil while playing a game under the direction of the teacher, failed to file the claim required by section 2.801 of the School Code. It was there contended that on certiorari it should be held that the filing of the claim was a jurisdictional prerequisite to the commencement or maintenance of the action. The court said (p. 360): "The requirements of section 2.801 of the School Code, however, cannot be brought within the doctrine of those cases involving statutes which restrict the power of the courts. Under the provisions of that section, liability on the part of the school district (that is, the waiver of sovereign immunity) is made dependent upon the filing of a claim within ninety days. That requirement, however, is one which goes to the elements of the plaintiff's right to recover rather than to the power of the court. Judgment in favor of the plaintiff in the absence of such a claim is a grievous error of law and a violation of statute. But not every violation of a statute constitutes excess of jurisdiction on the part of a court. The doctrine relied upon by petitioners applies only where the clear purpose of the statute is to restrict or limit the power of the court to act and where the effective enforcement of such restrictions requires the use of the extraordinary writs of certiorari or prohibition. Where, as here, the statute does not restrict the power of the court but merely sets up a condition precedent to the establishment of the plaintiff's cause of action, we think the violation of the statutory provision constitutes an error of law rather than excess of jurisdiction. (Cf. Karry v. Superior Court, 162 Cal. 281, 284 [122 P. 475, 128 P. 760]; Estrin v. Superior Court, 14 Cal.2d 670, 674 [96 P.2d 340].)"
 Certainly, if a statutory requirement of this character is not jurisdictional, a requirement of notice of the pendency of the action, after it is filed, cannot be jurisdictional.
 There is nothing in Lord v. Superior Court, 27 Cal.2d 855 [168 P.2d 14], Fortenbury v. Superior Court, 16 Cal.2d 405 [106 P.2d 411]; Abelleira v. District Court of Appeal, 17 Cal.2d 280 [109 P.2d 942, 132 A.L.R. 715], or Rodman v. Superior Court, 13 Cal.2d 262 [89 P.2d 109], cited by petitioner, on the general principle that "acts which exceed the defined power of a court ... are in excess of jurisdiction" that holds that a notice of this character is jurisdictional. *623
 3. No Error in Awarding Costs to Plaintiff.
 Petitioner contends that he should have been awarded costs instead of plaintiff, because, he claims, he was the prevailing party on appeal. This claim is based on the fact that the superior court awarded damages in the sum of $60 while the justice's court had awarded them in the sum of $88.40. [5] Plaintiff prevailed in the unlawful detainer part of the judgment, and as said in Markham v. Fralick, 2 Cal.2d 221, 227 [39 P.2d 804], "The primary purpose of such an action is for the recovery of the possession of the property. The recovery of rent is a mere incident to the main object." [6] Moreover, the trial in the superior court on appeals on questions of law and fact is a trial de novo, and costs must necessarily follow the prevailing party on that trial. [7] Petitioner cites rule 26(a), Rules on Appeal, which, of course, applies only to appeals from, and not to, the superior court. He also cites the costs rule of the appellate division of the superior court on appeals from the municipal court. Neither of these rules applies, nor are they analogous, for the reason that on none of the appeals to which they refer is there a trial de novo. There is no express rule upon the subject, and in the absence of such, costs must necessarily be awarded under section 1032, Code of Civil Procedure, as in other cases tried in the superior court. It becomes unnecessary to determine whether any error in allowing costs would be jurisdictional, as there was no error.
 4. Amount of Damages Awarded Not Jurisdictional.
 [8] On argument, petitioner contended that the damages awarded by the superior court were improper in amount because some portion of them covered a period prior to the giving of the notice to vacate. It is unnecessary to consider the correctness of that claim, for, if true, such an error would not be jurisdictional. The court had the power to consider and award damages, and an error in the amount would come within the holding in Rio Grande Oil Co. v. Superior Court, 86 Cal.App. 187 [260 P. 557], where the court said: "If the Superior Court was wrong in its judgment, this was nothing other than an error committed within the exercise of its jurisdiction. ..."
 [9] On argument, petitioner raised one other point: that the complaint failed to allege positively that plaintiff seeks in good faith not to offer the room for rent (the exception under the O.P.A. regulations which permits a landlord to *624 remove a tenant). The complaint alleged that the plaintiff had served upon defendant a written notice that he seeks in good faith not to offer said room for rent. The complaint is not a model of pleading on this point, but because a complaint might be demurrable does not deprive the court of jurisdiction. No demurrer was filed to the complaint, the defendant answered, and the case was tried, and one of the contentions made by petitioner at both trials was that plaintiff did not seek in good faith not to offer the room for rent. On this issue proof was made, and the court found in favor of plaintiff. It appears on the face of the complaint that plaintiff was contending for this proposition, and it would be absurd to hold that the imperfection in the pleading deprived the court of jurisdiction.
 The demurrers of all respondents should have been sustained, as the petition, even as amplified by the additional objections made on argument, does not state facts showing a lack of jurisdiction in the superior court, and hence shows no cause for the issuance of a writ of prohibition or any other extraordinary writ.
 The alternative writ of prohibition is discharged; the petition for a peremptory writ of prohibition or writ of certiorari is denied.
 Peters, P. J., and Ward, J., concurred.
